From: "Thompson, David" <dthompson2@worcester.edu>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Attempting to unbox struct fields
Date: Mon, 29 Feb 2016 16:09:01 -0500 [thread overview]
Message-ID: <CAJ=RwfafbCpp7F6YP-0FgPAEyMdmDz7DG=G9KVDi6g5zVVSF0Q@mail.gmail.com> (raw)
In-Reply-To: <87lh6376p2.fsf@netris.org>
On Mon, Feb 29, 2016 at 12:43 PM, Mark H Weaver <mhw@netris.org> wrote:
> "Thompson, David" <dthompson2@worcester.edu> writes:
>
>>> The first thing I noticed is that the patch assumes that doubles are the
>>> same size as pointers. Obviously this is not the case on 32-bit
>>> systems. What's the plan for those systems?
>>
>> Yeah, I just hacked this together on my x86_64 system and paid no mind
>> to portability. I was hoping that you or Andy or Ludovic would have
>> an idea for how to address portability issues. :)
>
> I think the approach we need to take is that for 32-bit systems, doubles
> will need to use two consecutive slots. Furthermore, those slots will
> either need to be aligned (i.e. the first slot must have an even index)
> or else the code that accesses 'double' struct fields will need to
> perform the access carefully, perhaps by copying each half separately
> into a local 'union' and then copying the double from there.
After talking with Andy on #guile for a bit, it has become apparent
that unboxing these fields will only be of limited utility. For
example, it would be nice to eventually handle arrays of unboxed data
like in C with an array of structs, but unboxing struct fields doesn't
get us any closer to such a goal. Thus, I am going to drop this work
and find another optimization to focus on.
Thanks anyway. It's been an educational experience.
- Dave
prev parent reply other threads:[~2016-02-29 21:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-28 15:03 Attempting to unbox struct fields David Thompson
2016-02-28 21:30 ` Thompson, David
2016-02-29 3:56 ` Mark H Weaver
2016-02-29 14:26 ` Thompson, David
2016-02-29 17:43 ` Mark H Weaver
2016-02-29 21:09 ` Thompson, David [this message]
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ=RwfafbCpp7F6YP-0FgPAEyMdmDz7DG=G9KVDi6g5zVVSF0Q@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.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).