develooper Front page | perl.perl5.porters | Postings from August 2012

Re: Seeking guidance on Benchmarking and potentially removing swashcaching

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
August 20, 2012 03:22
Subject:
Re: Seeking guidance on Benchmarking and potentially removing swashcaching
Message ID:
20120820102228.GB4366@iabyn.com
On Sun, Aug 19, 2012 at 12:14:39PM -0600, Karl Williamson wrote:
> I would prefer to benchmark more realistic real-world data, and
> wonder if anyone has some ideas on such, or any other thoughts on
> this issue.

Well, one thing would be to benchmark a worst-case scenario. Pick a
swatch that has a large inversion list: i.e. something that is maximally
bad for binary search; then run a loop where only the same character is
repeatedly looked up (so minimally small cache). And see whether the
result is significantly bad.

PS: If a swatch has only a small, fixed number of fields, would it be
better to use an array rather than a hash to represent it?

-- 
I've often wanted to drown my troubles, but I can't get my wife to go
swimming.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About