From: Daniel DeLorme <dan-ml@dan42.com>
To: ruby-core@ruby-lang.org
Subject: Re: Copy-on-write friendly garbage collector
Date: Thu, 13 Mar 2008 09:48:17 +0900 [thread overview]
Message-ID: <47D879DB.9010602@dan42.com> (raw)
In-Reply-To: <47D811A6.1050805@plan99.net>
Hongli Lai wrote:
> Great work Daniel. I don't measure the same amount of speedup that you
> claim in your email, but there is definitely a small speedup.
>
> I've added some further further optimizations.
> find_position_in_bitfield() now uses bit operators instead of division
> and modulo operators. This should speed things up a little more.
>
> The attached patch is created against Ruby 1.8, but it shows what I've
> exactly changed.
Thank you. I also looked at find_position_in_bitfield() but I assumed
the compiler would be able to make those optimizations, so ended up not
touching it.
I notice that this patch is relative to one of the patches that I
submitted. But in those patches I changed the bsearch to a linear
search, which may not be desirable as Matz pointed out. But I'm not sure
it's a good idea to sacrifice performance now for the sake of a
hypothetical change in heap size in the future (YAGNI). Maybe a #define
could take care of that? e.g.
#ifdef FEW_HEAPS
order heaps by size, linear search
#else
order heaps by memory location, bsearch
#endif
--
Daniel
next prev parent reply other threads:[~2008-03-13 0:50 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 9:48 Copy-on-write friendly garbage collector Hongli Lai
2008-03-03 12:38 ` Daniel DeLorme
2008-03-03 13:11 ` Yukihiro Matsumoto
2008-03-04 11:31 ` Gonzalo Garramuño
2008-03-07 12:04 ` Hongli Lai
2008-03-07 15:20 ` Paul Brannan
2008-03-07 16:22 ` Hongli Lai
2008-03-07 18:47 ` Joel VanderWerf
2008-03-08 5:34 ` Daniel DeLorme
2008-03-08 7:50 ` Daniel DeLorme
2008-03-08 10:01 ` Daniel DeLorme
2008-03-08 15:39 ` Yukihiro Matsumoto
2008-03-12 17:23 ` Hongli Lai
2008-03-12 17:38 ` Yukihiro Matsumoto
2008-03-13 0:48 ` Daniel DeLorme [this message]
2008-03-13 11:04 ` Hongli Lai
2008-03-15 16:15 ` Hongli Lai
2008-03-13 11:18 ` Hongli Lai
2008-03-14 3:20 ` Hongli Lai
2008-03-14 4:44 ` Daniel DeLorme
2008-03-14 11:25 ` Hongli Lai
2008-03-14 12:01 ` Meinrad Recheis
2008-03-14 15:00 ` Daniel Berger
2008-03-14 15:53 ` Hongli Lai
2008-03-14 17:34 ` Joel VanderWerf
2008-03-20 10:59 ` Hongli Lai
2008-03-20 11:55 ` Yukihiro Matsumoto
2008-03-20 12:54 ` Hongli Lai
2008-03-20 14:24 ` Yukihiro Matsumoto
2008-03-20 14:45 ` Hongli Lai
2008-03-20 15:28 ` Joel VanderWerf
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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47D879DB.9010602@dan42.com \
--to=ruby-core@ruby-lang.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).