--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
If you want more insight into the performance characteristics of Node and the underlying V8 virtual machine, there was a lengthy discussion on this list just recently. Check the archives to learn more than you probably wanted to know :-)
L.
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
--
Laurie Harper
http://laurie.holoweb.net/
There are several factors in play here. New optimizing backend does not _yet_:
1) support global variables with accessors --- so when it sees
'console' (which is global with accessors) it bails out, so your
testcase runs only as non-optimized code.
2) do strength reduction, so i % 2 will be compiled into idiv
instruction, while classic backend did strength reduction for modulo
with power-of-2 divisors and compiled it into an and instruction (with
a slow case for negative dividend).
Does this kind of loop dominate running time of your node.js application?
On Thu, Mar 10, 2011 at 11:29 AM, Dean Mao <dea...@gmail.com> wrote:
> If you want to see node 0.4 run as fast as 0.2.6, you can mess with Bert's
> fork:
Bert's fixes affect only node.js performance on Cygwin on Windows.
--
Vyacheslav Egorov
--
Vyacheslav Egorov
On Thu, Mar 10, 2011 at 7:58 AM, mycoding <mycod...@gmail.com> wrote:
> I checked perfomance of old versions and new versions and was upset.There are several factors in play here. New optimizing backend does not _yet_:
1) support global variables with accessors --- so when it sees
'console' (which is global with accessors) it bails out, so your
testcase runs only as non-optimized code.
// I also hope you are running ia32 version of node 0.4.2 or more recent.
--
Vyacheslav Egorov
If you don't see anything that means that Crankshaft is not active for
some reason (e.g. you are running x64 build of node with V8 prior to
3.2.0 which enabled crankshaft for x64).
Also make sure to specify flags like this:
node --trace-opt --trace-osr --trace-bailout --trace-deopt test.js
not like this
node test.js --trace-opt --trace-osr --trace-bailout --trace-deopt
--
Vyacheslav Egorov
On Thu, Mar 10, 2011 at 1:24 PM, Egor Egorov <egor....@gmail.com> wrote:
> Sure but, uh, where do I find the results to send 'em to you? I ran that and
> no log files found.
>
All data is printed to stdout.If you don't see anything that means that Crankshaft is not active for
some reason (e.g. you are running x64 build of node with V8 prior to
3.2.0 which enabled crankshaft for x64).
Yes. When Crankshaft was initially released it supported only ia32.
3.2.0 enables it on x64 and ARM. But I would not recommend immediately
pulling it into production. There are some known bugs in x64
Crankshaft so we had to revert 3.2.0 from Chrome tree and are actively
working on fixing them.
> This line "Bailout in HGraphBuilder: @"": global variable has accessors" is useful, but how do I know the name of the variable so I can optimize my own code?
Unfortunately only by setting breakpoint in hydrogen's guts. This
output was never intended to be widely used externally. Eventually all
or almost all constructs will be supported by hydrogen.
--
Vyacheslav Egorov
[]
> This line "Bailout in HGraphBuilder: @"": global variable has accessors" is useful, but how do I know the name of the variable so I can optimize my own code?
Unfortunately only by setting breakpoint in hydrogen's guts.
For this particular bailout you can put it into
HGraphBuilder::LookupGlobalPropertyCell. Something like:
if (lookup->type() != NORMAL) {
if (FLAG_trace_bailout) PrintF("global var with accessor %s\n",
*var->name()->ToCString()); // add this line to see name of the
variable
BAILOUT("global variable has accessors");
}
But there are a lot of other bailouts and they do not print any
detailed information.
--
Vyacheslav Egorov
> Seems like the fastest versions are all on v8-3.1.6
Judging by addresses you are running x64 bit version of node.
The difference between V8 3.2.x and V8 3.1.x is that Cranskshaft was
not enabled for x64 prior to V8 3.2.0.
Why Crankshaft is slower on this particular micro-benchmark than
classical backend was explained in my first message in the thread ---
strength reduction is missing.
--
Vyacheslav Egorov
Just a note to say that as of 2a05fe784d1c7ced3cee11e0d9e066b3bb0f361e
this is no longer the case.