File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
gibbon-ghc-integration/examples Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,12 @@ main = do
5353 -- !fastn <- fastbench1 10
5454 -- print fastn
5555
56- let size = 22
56+ let size = 25
5757 let iters = 9
58- (res0, t0, t_all) <- bench bench1 size iters
59- return (show res0, show t0, show t_all)
58+ (res0, t0, t_all_0) <- bench bench1 size iters
6059
61- (res0, t0, t_all) <- bench fastbench1 size iters
62- return (show res0, show t0, show t_all)
60+ (res1, t1, t_all_1) <- benchIO fastbench1 size iters
61+
62+ print (res0,t0)
63+ print (res1,t1)
6364 pure ()
Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ liftbench1 n = sumTree_seq (mkTree_seq n)
5050
5151
5252foreign import ccall unsafe " c_liftbench1"
53- cfastbench1 :: CInt -> CInt
53+ cfastbench1 :: CInt -> IO CInt
5454
55- fastbench1 :: Int -> Int
56- fastbench1 x =
57- let y = cfastbench1 (fromIntegral x)
58- in fromIntegral y
55+ fastbench1 :: Int -> IO Int
56+ fastbench1 x = do
57+ y <- cfastbench1 (fromIntegral x)
58+ pure $ fromIntegral y
5959
6060--------------------------------------------------------------------------------
6161
You can’t perform that action at this time.
0 commit comments