Other shootout news

| No Comments | No TrackBacks

I've been talking to Stephen Blackheath on the #haskell-in-depth channel, and he's just submitted another new program to the shootout. This entry is for the regex-dna problem.

For this benchmark, each language is limited by the speed of the regex library it's using.
Right... let me see. Here's what I did;
I am not certain, but it seems that forcing the evaluation of s1, s2 and s3 (the blobs of input data) before parallelizing the processing gave better CPU utilisation. I also changed the part at the end where it does large numbers of pattern substitutions, so that it updated everything in-place in a mutable buffer. I found that splitting the pattern substitutions into chunks sped things up by a factor of three. It looks like there's some sort of overhead incurred on large buffers when the regex 'match' function creates its AllMatches array.
The reason why I needed memmove instead of memcpy is that memmove can work on overlapping buffers.
These changes improved the performance from 1:00 user / 0:42.2 real to 0:40.1 user / 0:25.12 real on my dual core, compared with 23.3 sec user for the slower non-parallel one of the two C++ implementations. (The parallel one wouldn't build for me.)

You can see the details of the submission here, and the actual code. He also adds:

I took my unsafePerformIO's out too. I have a reputation to maintain!

It's good to see that someone else is working on making haskell look good (and doing a much better job than me thankfully!). Maybe soon we'll be topping the list, or at least beating Java to move up to 4th place.

No TrackBacks

TrackBack URL: http://axman6.homeip.net/cgi-bin/mt/mt-tb.cgi/23

Leave a comment

February 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.23-en

About this Entry

This page contains a single entry by Alex Mason published on February 6, 2009 12:44 AM.

More n-bodies speedups was the previous entry in this blog.

Shootout PiDigits program kinda sucks (and possibly so does GHC) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.