And one more question: If I was trying to find the upper bounds of where
this effect starts to kick in, how should I go about it?

Yehuda Katz
Architect | Strobe
(ph) 718.877.1325


On Wed, Dec 8, 2010 at 9:24 PM, Yehuda Katz <[email protected]> wrote:

> Thanks!
>
> Some armchair analysis validates my assumption that small methods, even
> when grouped inside objects, compile to faster structures than one long,
> objectless method.
>
> A couple questions:
>
>    - Does this sound right? It seems to hold across all modern JS engines.
>    Would you expect that?
>    - If you were looking to validate this assumption in V8, what debugging
>    output might you look at?
>
>
>
>
> Yehuda Katz
> Architect | Strobe
> (ph) 718.877.1325
>
>
> On Wed, Dec 8, 2010 at 8:04 PM, Paul Lind <[email protected]> wrote:
>
>> I should add that these flags were mostly intended for development of v8
>> itself, and it is not necessarily easy to correlate the generated code with
>> your javascript source. The --print-ast option can help with this.
>>
>> Paul
>>
>>
>>
>> On Dec 8, 2010, at 9:43 PM, Paul Lind <[email protected]> wrote:
>>
>> > Hi Yehuda -
>> >
>> > The v8 shell has a lot of options for seeing the generated code. Build
>> the shell in debug mode:
>> >
>> > scons mode=debug sample=shell -jNN
>> >
>> > Then run your code with these options, as a start:
>> >
>> > shell_g --debug-code --print-code xxx.js
>> >
>> > Other useful opts are: --print-code-stubs --trace-codegen
>> >
>> > You can see all available opts with shell_g --help
>> >
>> > There are also a lot of code profiling options built in, which may be
>> very useful for you.
>> >
>> > v8 had major changes in the past day that will certainly affect
>> performance, you might way to pull the latest, if you are on ia32 arch.
>> >
>> > Hope this helps,
>> >
>> > Paul
>> >
>> >
>> >
>> > On Dec 8, 2010, at 7:57 PM, Yehuda Katz <[email protected]> wrote:
>> >
>> >> Are there flags in V8 that will print out information about the V8
>> >> optimization process. For instance, in Hotspot, I can ask Java to
>> >> print out debugging information when a method gets compiled (-XX:
>> >> +PrintCompilation +PrintAssembly +PrintInlining) to see what kinds of
>> >> optimizations are happening.
>> >>
>> >> This can be used to find trouble spots in code, where Hotspot is
>> >> intentionally not optimizing something that you might expect to get
>> >> optimized. One example would be methods that are too large to get
>> >> compiled in Hotspot. Are there similar or equivalent mechanisms in v8.
>> >> I am interested in learning more about what optimizations are
>> >> performed on different kinds of code in more detail.
>> >>
>> >> Thanks,
>> >>
>> >> -- Yehuda Katz
>> >> -- SproutCore
>> >> -- Strobe, Inc.
>> >>
>> >> --
>> >> v8-users mailing list
>> >> [email protected]
>> >> http://groups.google.com/group/v8-users
>> >
>> > --
>> > v8-users mailing list
>> > [email protected]
>> > http://groups.google.com/group/v8-users
>>
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>>
>
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to