Improve reader performance on Firefox/Windows

Description

cljs.reader/read-string speeds up by a factor of 2 on Firefox/Windows through this change without complicating the code.

(Other JS engines, including Firefox on Linux/Mac do not seem to be affected as significantly.)

Environment

Firefox on Windows

Activity

Show:
David Nolen
October 21, 2016, 3:33 AM

It would be nice to have a bit more information on this ticket as to what Google Closure does that's unnecessary or whether this path is actually a faithful port of Clojure behavior (copies the implementation of the EDN reader in these hot spots??). Finally the patch names David Frese, have they submitted a CA?

Thanks!

import
October 21, 2016, 10:49 PM

Comment made by: sperber

I believe the Google functions are too general, work on strings in addition to characters etc.

It's not clear to us though why only Firefox on Windows benefits.

(David Frese is a co-worker - yes, has submitted a CA.)

Mike Fikes
November 20, 2017, 12:41 PM

Patch no longer applies; needs re-baseline.
Also, doesn't work with git am; recommend creating patch using https://clojurescript.org/community/patches

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

Code

Affects versions

Priority

Minor