public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
* Potential performance issue
@ 2015-01-01  0:00 Dibyendu Majumdar
  2015-01-01  0:00 ` Dibyendu Majumdar
  0 siblings, 1 reply; 3+ messages in thread
From: Dibyendu Majumdar @ 2015-01-01  0:00 UTC (permalink / raw)
  To: jit

Hi Dave,

I have not yet had the time to try out replacing union with struct to
check performance. Hope to do this soon. But I did try another change
and was somewhat surprised by the result.

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 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.

This is just an FYI as I don't intend to investigate this right now (I
have saved the changes so that I can look at this at some time in the
future).

Regards
Dibyendu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-15 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-01  0:00 Potential performance issue Dibyendu Majumdar
2015-01-01  0:00 ` Dibyendu Majumdar
2015-01-01  0:00   ` Dibyendu Majumdar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).