Potential performance issue

Dibyendu Majumdar mobile@majumdar.org.uk
Thu Jan 1 00:00:00 GMT 2015


On 15 July 2015 at 20:47, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>> As you know currently I take the address of a Lua stack value and then
>> use the pointer to manipulate the value. This is hangover from the
>> LLVM port as there it has to be a pointer. But in the libgccjit world,
>> we actually do not need the pointer unless the pointer needs to be
>> passed to a function. So most of the time we can just work off the
>> value array directly.
>>
>> That is instead of:
>>
>> (&base[1])->value.tt_
>>
>> I can just use
>> base[1]->value.tt_
>
> I meant base[1].value.tt_ above (sorry for the typo!)
>
>>
>> I was hoping that this might help performance somewhat as presumably a
>> pointer (going by your change to get_address) may not be optimisable.
>> To my surprise however the performance dropped by half after the
>> change. So of course I have not committed this change.
>>

It turns out that I had the build set to Debug build. This threw me as
the Ravi build setting should have no impact on the JIT compiler (as
it has its own setting) so not sure why the performance was degraded.


Apologies for the false alarm.

Regards
Dibyendu



More information about the Jit mailing list