From: Alex Gramiak <agrambot@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Removing assumption of unsigned long pixel values for colours
Date: Mon, 06 May 2019 14:03:11 -0600 [thread overview]
Message-ID: <87lfzjic5c.fsf@gmail.com> (raw)
In-Reply-To: <jwvpnovilfe.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 06 May 2019 12:51:24 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> The original plan was to avoid any conversion at all (no conversion
>> necessary on the Emacs side to create the struct of doubles); would you
>> still consider the difference between no conversion and 4 conversions to
>> be negligible?
>
> That which costs is when we can't use a pre-existing struct and need to
> allocate a new struct and copy the values to it (with or without
> conversion).
The no-conversion method I was proposing wouldn't involve heap
allocation, but it would involve copying the doubles around from, e.g.,
a frame struct to GC struct.
I might have been able to avoid some of those copies by using GdkRGBA
pointers in the GC structs.
> If we need to do the copy anyway, the added cost of a conversion along
> the way is very likely to be negligible. The rule of thumb is that
> arithmetic operations are free (contrary to data movement).
I knew that they're efficient, but I thought given the high frequency of
draw operations that it would do well to shave them off. I guess my
intuition isn't great on this topic.
next prev parent reply other threads:[~2019-05-06 20:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 18:08 Removing assumption of unsigned long pixel values for colours Alex Gramiak
2019-05-04 18:39 ` Eli Zaretskii
2019-05-04 23:04 ` Alex Gramiak
2019-05-05 16:14 ` Eli Zaretskii
2019-05-05 19:35 ` Alex Gramiak
2019-05-06 2:45 ` Eli Zaretskii
2019-05-06 14:13 ` Daniel Pittman
2019-05-06 16:11 ` Alex Gramiak
2019-05-06 16:51 ` Stefan Monnier
2019-05-06 20:03 ` Alex Gramiak [this message]
2019-05-06 15:11 ` Alex Gramiak
2019-05-06 15:45 ` Eli Zaretskii
2019-05-06 16:29 ` Alex Gramiak
2019-05-06 16:54 ` Eli Zaretskii
2019-05-06 17:14 ` Alex Gramiak
2019-05-06 17:39 ` Eli Zaretskii
2019-05-06 18:00 ` Eli Zaretskii
2019-05-06 19:49 ` Alex Gramiak
2019-05-07 2:29 ` Eli Zaretskii
2019-05-06 8:12 ` Alan Third
2019-05-06 9:18 ` mituharu
2019-05-06 15:06 ` Eli Zaretskii
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=87lfzjic5c.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.