Drastic performance improvment for uniformR #6

Merged
merged 3 commits into from Dec 13, 2011

2 participants

@Shimuuar
Collaborator
20-40x performance improvements for uniformR for integral times

It looks like GHC fails to specialize uniformRange despite INLINE
pragma. This results in horrible 20-40x slowdown. Adding
SPECIALIZE pragma fixes that

Also accept ranges (a,b) where a<b for integral types. It doesn't produce any
measurable slowdown.

Benchmarks are added as well
Shimuuar and others added some commits Sep 26, 2011
@Shimuuar Shimuuar Add uniformR to benchmarks 43ca7d7
Aleksey 20-40x performance improvements for uniformR for integral times
It looks like GHC fails to specialize uniformRange despite INLINE
pragma. This results in horrible 20-40x slowdown. Adding
SPECIALIZE pragma fixes that

Also accept ranges (a,b) where a<b. It doesn't produce any
measurable slowdown.

fixes #4.
d7fda63
@Shimuuar Shimuuar Fix uniformRange for case where (x1 > x2) 3909677
@Shimuuar
Collaborator

Ping?

@bos bos merged commit 1c1f03a into bos:master Dec 13, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment