Print js/Infinity, js/-Infinity, js/NaN using new reader literals
Description
Environment
None
Attachments
1
CLJS-2374.patch
30 Sep, 2017
Activity
David Nolen September 30, 2017 at 8:34 PM
David Nolen
September 30, 2017 at 8:34 PM

Mike Fikes September 30, 2017 at 3:09 PM
Mike Fikes
September 30, 2017 at 3:09 PM
The benchmarks added focus on printing booleans and numbers, since
this is where the change was. It also adds a test for an empty JavaScript
object, since this is the first branch after the changed code.
A summary of the speedup is given for each value type and each engine,
followed by the full details.
Perhaps the two perf regressions that might be important for this candidate
change are slowdown of printing regular numbers in V8 (but perhaps that is
outweighed by the 1.40 speedup getting to everything else after the
code—the (js-obj) test, and general
slowdown for things after the code—the (js-obj) test—for
JavaScriptCore.
Before:
After:
Completed
Details
Details
Assignee
Reporter

Approval
Accepted
Patch
Code and Test
Priority

Created September 30, 2017 at 2:04 PM
Updated September 30, 2017 at 8:34 PM
Resolved September 30, 2017 at 8:34 PM
In the Clojure 1.9 beta1 release you can round-trip
via code here
https://github.com/clojure/clojure/blob/861d48ea761418fcb59dc4eb1c63bd29c2f35231/src/clj/clojure/core_print.clj#L131-L143
This ticket asks for similar behavior in ClojureScript, whereas currenly on master the vector above is printed as
.