> > I'm wondering if this whole game is even necessary.  Could we use the
> > struct version in opt builds as well?  The only reason I can think not
> > to is if some compilers do not optimize a struct containing a single
> > integer as well as they would a naked integer.

That's right, in particular for parameter passing, in many ABIs, structs always 
get passed on the stack.  I tested this 3 years ago and it was definitely 
measurable on SS/V8.  It probably matters less on these benchmarks nowadays b/c 
we spend less time in the VM, but, of course, benchmarks are not the only thing 
that matters.  It'd be useful to measure if there was a difference on, e.g., 
the testcase in bug 907369, since proxy handlers shuffle around a lot of jsids 
as parameters.

> At any rate, we're definitely already screwed on compilers than don't
> properly optimized those kinds of structs. (See Value!)

Value gets passed around by 'const Value &' since, on 32-bit, it gets passed on 
the stack anyways.  Well, and HandleValue, but not by value (usually).
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to