-
Notifications
You must be signed in to change notification settings - Fork 339
Stylus tests failing in Node-ChakraCore #498
Comments
I believe this is the same as the chakracore issue chakra-core/ChakraCore#2512 |
Isolated repro: They expect output: 9.090909090909092 Debugger shows all three numbers as 9.0909090909090917165 Note: we have separate code path for decimal conversion. |
FDblToRgbPrecise produces 9.090909090909092 representation. FDblToRgbFast hasn't changed since 2006 (other than handling errors and moving helpers into namespace). Hiding FDblToRgbPrecise behind FDblToRgbFast goes as far back as 2002 (without any interesting comments on why it's this way). Did a mini-benchmark: in x86 Release build FDblToRgbPrecise is about 2.8 times slower than FDblToRgbFast (a loop over 10^6 doubles: 733949944 & 263994008 nanoseconds). |
Replacing FDblToRgbFast with FDblToRgbPrecise regressed the following benchmarks: Discussed with Louis and he thinks regressing perf of JSON.stringify like this isn't acceptable: JSON.stringify({ 'pi': 3.14 }) calls ToString and it's not inconceivable to have real life scenarios with json describing objects with many floating point properties. |
JSON I can see- why does splay regress with that change? I thought Splay was memory intensive. Is the String-tagcloud case also using JSON stringify in the hot path? |
Splay test generates a new random number and then converts it to string in a loop (see InsertNewNode()). Ends up calling ToString 10K+ times. String-tagcloud creates "a href" tag using popularity numbres, which are converted to string. Calls ToString 2.5K+ times. |
Repro steps (attempted on Linux):
Result: 26 pass, 1 fail
The text was updated successfully, but these errors were encountered: