Optimize js->clj by switching to transients

Description

None

Environment

None

Attachments

4

Activity

Show:

Dieter Komendera June 26, 2018 at 10:41 PM

Thomas Spellman's patch rebased on current master.

Mike Fikes November 20, 2017 at 2:10 AM

js-to-clj-using-transients.patch no longer applies.

Thomas Spellman October 21, 2016 at 9:01 AM

Added a patch, "js-to-clj-using-transients.patch", on Oct 16, 2016 that supersedes "use-transducers-in-js-to-clj.patch" from Aug, 2014. This patch changes cljs.core/js->clj to use transients. Also included is a change to both js->clj and clj->js to use gobject/get and gobject/set instead of aget and aset on JS object.

The JSperf shows a 17% speed improvement in Chrome on the first run, but about equal on the second run: https://jsperf.com/js-clj-transient-perf-test

The code for the JSperf is here: https://gist.github.com/thos37/41c0b38bea3270988a3275332686ab49

What would be the ideal test data for this?

David Nolen October 9, 2015 at 6:33 PM

Rohit good catch. Yes that should be changed.

Completed

Details

Assignee

Reporter

Approval

Accepted

Patch

Code

Priority

Created August 22, 2014 at 7:13 PM
Updated June 29, 2018 at 8:03 PM
Resolved June 29, 2018 at 8:03 PM