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

the speed is too slow #42

Open
kaisatec opened this issue May 3, 2015 · 1 comment
Open

the speed is too slow #42

kaisatec opened this issue May 3, 2015 · 1 comment

Comments

@kaisatec
Copy link

kaisatec commented May 3, 2015

my code

var a=0;
var j=10000;
for (var i=0; i<=j;i++){
a=a+i_i_30+i/2+i/2;
}

for eval(js)

1 ms

for sandbox

188ms

is there a way to improve the speed?

Thanks

@yorickvP
Copy link

I suspect that this is a fixed delay caused by starting a new process etc. The actual execution should not be slower, but loading v8 and node adds some overhead. If you double the loop size, does the time double?

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

No branches or pull requests

2 participants