on master help sign in
Disable some redundant serialize benchmarks
commit3e93e222283048bdaf7358307e9ae81dec0cc21d authorHarendra Kumar <harendra@composewell.com> dateWed 23 Aug 2023, 14:55 (3 years ago) parent71346fd
1 file changed+8−2
benchmark/Streamly/Benchmark/Data/Serialize.hs+8−2
benchmark/Streamly/Benchmark/Data/Serialize.hs+8−2
@@ -229,6 +229,7 @@ instance Eq Product25 where
229229-- Simple non-recursive ADT
230230-------------------------------------------------------------------------------
231231
232+{-
232233data CustomDT1
233234 = CDT1C1
234235 | CDT1C2 Int
@@ -246,6 +247,7 @@ instance NFData CustomDT1 where
246247 rnf CDT1C1 = ()
247248 rnf (CDT1C2 i) = i `seq` ()
248249 rnf (CDT1C3 i1 i2) = i1 `seq` i2 `seq` ()
250+-}
249251
250252-------------------------------------------------------------------------------
251253-- Recursive ADT
@@ -329,6 +331,7 @@ benchSink name times f = bench name (nfIO (randomRIO (times, times) >>= f))
329331-- Serialization Helpers
330332-------------------------------------------------------------------------------
331333
334+{-
332335{-# INLINE pokeWithSize #-}
333336pokeWithSize :: SERIALIZE_CLASS a => MutableByteArray -> a -> IO ()
334337pokeWithSize arr val = do
@@ -341,6 +344,7 @@ pokeTimesWithSize val times = do
341344 let n = getSize val
342345 arr <- newBytes n
343346 loopWith times pokeWithSize arr val
347+-}
344348
345349{-# INLINE poke #-}
346350poke :: SERIALIZE_CLASS a => MutableByteArray -> a -> IO ()
@@ -436,6 +440,7 @@ benchConst gname f times =
436440 bgroup gname
437441 [ let !n = getSize Unit
438442 in benchSink "Unit" times (f n Unit)
443+ {-
439444 , let !n = getSize CDT1C1
440445 in benchSink "C1" times (f n CDT1C1)
441446 , let val = CDT1C2 5
@@ -444,6 +449,7 @@ benchConst gname f times =
444449 , let val = CDT1C3 5 2
445450 !n = getSize val
446451 in benchSink "C3" (times `div` 3) (f n val)
452+ -}
447453 , let !n = getSize Sum21
448454 in benchSink "Sum2" times (f n Sum21)
449455 , let !n = getSize Sum2525
@@ -488,13 +494,13 @@ allBenchmarks tInt lInt times =
488494#endif
489495 ]
490496 , benchConst "poke" (const pokeTimes) times
491− , benchConst "pokeWithSize" (const pokeTimesWithSize) times
497+ -- , benchConst "pokeWithSize" (const pokeTimesWithSize) times
492498 , benchConst "encode" (const encodeTimes) times
493499 , benchConst "peek" peekTimes times
494500 , benchConst "roundtrip" (const roundtrip) times
495501#ifndef USE_UNBOX
496502 , benchVar "poke" (const pokeTimes) tInt lInt 1
497− , benchVar "pokeWithSize" (const pokeTimesWithSize) tInt lInt 1
503+ -- , benchVar "pokeWithSize" (const pokeTimesWithSize) tInt lInt 1
498504 , benchVar "encode" (const encodeTimes) tInt lInt 1
499505 , benchVar "peek" peekTimes tInt lInt 1
500506 , benchVar "roundtrip" (const roundtrip) tInt lInt 1