Added sparse array check:
arv@zapp:~/src/v8 (faster-for-each)
$ out/ia32.release/d8 test.js
ForEach: 179435
ForEach2: 363199
ForEachWithHoles: 117389
ForEach2WithHoles: 109674
arv@zapp:~/src/v8 (faster-for-each)
$ out/ia32.release/d8 test.js
ForEach: 179573
ForEach2: 368303
ForEachWithHoles: 121373
ForEach2WithHoles: 111130
arv@zapp:~/src/v8 (faster-for-each)
$ out/ia32.release/d8 test.js
ForEach: 184737
ForEach2: 367396
ForEachWithHoles: 122627
ForEach2WithHoles: 112499
The reason ForEach2WithHoles is slightly faster seems to be that some
optimization kicks in. Changing the order of the tests makes
ForEachWithHoles
slightly faster.
$ out/ia32.release/d8 test.js
ForEach2: 365734
ForEach: 182602
ForEach2WithHoles: 112983
ForEachWithHoles: 123444
https://codereview.chromium.org/22545007/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.