Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array.forEach is much slower than for #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ROMB
Copy link

@ROMB ROMB commented Apr 30, 2013

This is really faster in about 40%

@ROMB
Copy link
Author

ROMB commented Apr 30, 2013

In fact, it is 40% less CPU time, that is, productivity increased approximately 6 times.

@ROMB
Copy link
Author

ROMB commented Apr 30, 2013

Fixed some typo

@jeromeetienne
Copy link
Owner

40% faster !!! defintitly interesting, how did you get this number ?

@ROMB
Copy link
Author

ROMB commented Apr 30, 2013

CPU profiling on my own project. Fireworks CPU usage on render changed from 48% to 8%

@ROMB
Copy link
Author

ROMB commented Apr 30, 2013

Also found some tests. http://jsperf.com/foreach-speed-test

This is really faster in about 40%
@ROMB
Copy link
Author

ROMB commented Apr 30, 2013

Updated... I'm bein wrong about for .. in, because i'm writing on coffescript, and it replaces for in with for loop.
Updated test to compare forEach, for .. in and for. http://jsperf.com/foreach-speed-test/3

@ROMB
Copy link
Author

ROMB commented Sep 6, 2013

up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants