Commit ee75b9ea authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a performance test for #3738

parent ede34669
module Main where
import T3738a
{-# INLINE bar #-}
bar :: Int -> [Int]
bar x = map (+ 2) (foo x)
main = print (bar 2 !! 10000)
module T3738a where
{-# INLINE foo #-}
foo :: Num a => a -> [a]
foo x = map (+ 1) (repeat x)
......@@ -43,4 +43,15 @@ else:
test('T4321', omit_ways(['ghci']), compile_and_run, ['-O ' + sse2_opts])
test('T3736', normal, run_command, ['$MAKE -s --no-print-directory T3736'])
test('T3738',
[stats_num_field('peak_megabytes_allocated', 1,
1),
# expected value: 1 (amd64/Linux)
stats_num_field('bytes allocated', 60000,
61000),
# expected value: 60368 (amd64/Linux)
only_ways(['normal'])
],
compile_and_run,
['-O'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment