Just do:

./shell -e 'var s = Date.now(); var i=1e7; while(i--); print(Date.now() - s);'
./jsc -e 'var s = Date.now(); var i=1e7; while(i--); print(Date.now() - s);'

This way we will see the cost of setting up/tearing down VM vs. the
cost of running loop.

(also ensure that your node/shell is compiled with snapshots
(snapshot=on) so at least Context boostrapping time is not included).

Then if you still can repro: specify all details of your build (OS,
architecture, hardware vs. virtualized env etc).

Also ensure that shell and jsc are of the same arch (file shell, file jsc).


--
Vyacheslav Egorov

On Sat, May 26, 2012 at 6:01 PM, Oliver Leics <[email protected]> wrote:
> On Sat, May 26, 2012 at 5:26 PM, Bert Belder <[email protected]> wrote:
>> On May 25, 11:21 pm, Oliver Leics <[email protected]> wrote:
>>> On Fri, May 25, 2012 at 9:50 PM, Jorge <[email protected]> wrote:
>>> > It does not take 3 seconds to start it up.
>>>
>>> Please explain:
>>>
>>>   $ time node -e 'i=1e7; while(i--);'
>>>
>>
>> Startup time should be in the order of 10s of milliseconds, so that's
>> not it. However, there's a simple explanation for it.
>> First of all, notice that `node -e` uses `eval()` (see
>> [...]
>
> Thank you.
>
> @Jorge
>
> Please post the numbers for
>
>  echo "var i=1e7;while(i--);" > test.js && time node test.js
>
> and
>
>  echo "var i=1e7;while(i--);" > test.js && time jsc test.js
>
> Thank you in advance.
>
> - o
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to