Hi, May be it is not exact enough, I agree. However the delta is too big to ignore and can be seen using time as well:
(I removed the console.log and Date.now() from script) $ time node app.js real 0m0.087s user 0m0.069s sys 0m0.017s $ time node64 app.js real 0m0.098s user 0m0.080s sys 0m0.017s On Thursday, January 31, 2013 2:12:28 PM UTC-8, mschwartz wrote: > > I'm not sure it's reliable to use Date.now() for benchmarking purposes. > > > On Jan 31, 2013, at 2:01 PM, Dennis H <[email protected] <javascript:>> > wrote: > > Hi, > > I just tried some JS script on nodejs, which doesn't use any of nodejs > APIs: > > var t1 = Date.now(); > var arr = []; > for (var i=0; i < 100000; i++) { > arr[i] = (100 + i) + " bla "; > } > console.log('Time ' + (Date.now()-t1)); > > This turns out to consume 26ms on the 32 bit and 33ms on the 64 bit RHEL > linux, which is 27% slower. > > Any idea for the reason and plans to improve? > > Thanks, > Dennis > > -- > -- > v8-users mailing list > [email protected] <javascript:> > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" 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.
