Clojure JIRAhttp://dev.clojure.org/jira
This file is an XML representation of an issueen-us4.464925-07-2011[CLJS-503] v8 penalizes coercive nil?http://dev.clojure.org/jira/browse/CLJS-503
ClojureScript<p>We check for nil coercively with != and = because we want to handle both JavaScript null and undefined. These operations are slower than !== and ==. We would like to fix this but we can't simply make nil? not be coercive. The persistent data structures rely on this because they reach into JS Arrays that been allocated with a certain size. However in JS the empty slots are filled with undefined and null requiring the more expensive coercive nil? check.</p>
<p>Making nil? non-coercive seems to bring less of performance boost in WebKit/Firefox Nightlies, but v8 is still the king and everyone seems to be moving towards it performance wise.</p>
<p>One issue with making nil? non-coercive is that undefined will then fall through many of the core library functions. This means that users will need to be more careful in interop scenarios.</p>CLJS-503v8 penalizes coercive nil?EnhancementMinorClosedDeclinedUnassignedDavid NolenSat, 4 May 2013 11:59:00 -0500Sat, 3 Jan 2015 18:18:46 -0600Sat, 3 Jan 2015 18:18:43 -060000<p>probably too small of a hit to care at this point.</p>Global Rank