From: Dibyendu Majumdar <mobile@majumdar.org.uk>
To: jit@gcc.gnu.org
Subject: Potential performance issue
Date: Thu, 01 Jan 2015 00:00:00 -0000 [thread overview]
Message-ID: <CACXZuxe54Kvb3H3FieXMp6TDuVZEhzNJent5TSXFYmRQ9Kj0+w@mail.gmail.com> (raw)
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
next reply other threads:[~2015-07-15 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 0:00 Dibyendu Majumdar [this message]
2015-01-01 0:00 ` Dibyendu Majumdar
2015-01-01 0:00 ` Dibyendu Majumdar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACXZuxe54Kvb3H3FieXMp6TDuVZEhzNJent5TSXFYmRQ9Kj0+w@mail.gmail.com \
--to=mobile@majumdar.org.uk \
--cc=jit@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).