
3 Nov
2011
3 Nov
'11
8:27 a.m.
2011/11/3 José Pedro Magalhães
- Compile with -O2 and -fno-spec-constr-count (this last one is particularly important)
I already compiled with -O2. Adding -fno-spec-constr-count does not change the results.
- Add {-# INLINE [1] #-} pragmas to the to/from methods of your Generic instances.
I tried: BigSum/toJSON/generic goes from 70 ns to 52 ns! So inlining 'from' is an improvement. Unfortunately BigSum/fromJSON/generic stays at 13 us. Bas