Optimized code depends on type feedback, so in this case it'll change
depending on what kinds of things *unoptimized* code has seen for "n".
On Tue, Sep 22, 2015 at 1:21 PM, D T wrote:
> Ahhh, that explains a lot! I wondered what the optimized code is about,
> for those few lines...
>
> However,
Ahhh, that explains a lot! I wondered what the optimized code is about, for
those few lines...
However, is there any indication how often the function is called (how many
loop steps) to produce the same optimized code? Or, a slightly different
question: If I let v8 optimize the same code a few
Functions aren't optimized right away, only when they're detected as "hot".
Try calling your function 1000 times or so in a loop. (The bigger it is,
the less often it needs to be called to be considered "hot"; the details of
that mechanism are rather complicated.)
On Tue, Sep 22, 2015 at 11:46 AM,
Sorry, sometimes I even confuse myself ;)
Okay, so I attached the original file I was sent. It states the Raw source
and the "optimized" code (and also uses the crankshaft optimizing compiler
of v8).
Nevertheless, when I try to run the function stated in the Raw code, I do
not get any optimized
Not sure I understand. If nothing is printed, are you sure the function
gets optimised at all?
On 22 September 2015 at 10:42, D T wrote:
> Thanks for your quick answer, Andreas!
>
> So, I got the snippet I showed you avove by mail to look over the ASM code
> (I dont have much experience with Jav
Thanks for your quick answer, Andreas!
So, I got the snippet I showed you avove by mail to look over the ASM code
(I dont have much experience with Javascript ;) ).
When run the d8 as follows:
v8/out/ia32.release/d8 --print_opt_code test.js
With the code printed in the RAW section (slightly modi
The printed raw source _is_ the exact source of that individual function
(minus the 'function' prefix). What are you missing?
On 21 September 2015 at 23:49, D T wrote:
> Hi v8 users,
>
> I am using d8 version 4.7.0 on Ubuntu Linux vivid. I played around with d8
> a little bit and used the follow
Hi v8 users,
I am using d8 version 4.7.0 on Ubuntu Linux vivid. I played around with d8
a little bit and used the following command line:
user@debugbox: v8/out/ia32.release/d8 --print_opt_code test.js
Which leads to the following output:
--- Raw source ---
(n)
{
return Math.floor(Math.rando