Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Software
CoPaR
Commits
7f0d3699
Commit
7f0d3699
authored
Dec 22, 2018
by
Hans-Peter Deifel
🐢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix whitespace
parent
c3cca39c
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
bench/Data/BenchBlockQueue.hs
bench/Data/BenchBlockQueue.hs
+8
-12
No files found.
bench/Data/BenchBlockQueue.hs
View file @
7f0d3699
...
...
@@ -3,7 +3,7 @@
module
Data.BenchBlockQueue
(
benchmarks
)
where
import
Prelude
hiding
(
elem
)
import
Prelude
hiding
(
elem
)
import
Criterion
...
...
@@ -49,18 +49,14 @@ benchDequeue = bgroup
]
benchElem
::
Benchmark
benchElem
=
bgroup
"elem"
[
mkBench
10
,
mkBench
20
,
mkBench
30
,
mkBench
100
,
mkBench
200
,
mkBench
300
]
benchElem
=
bgroup
"elem"
[
mkBench
10
,
mkBench
20
,
mkBench
30
,
mkBench
100
,
mkBench
200
,
mkBench
300
]
where
mkBench
n
=
bench
(
show
n
++
" blocks"
)
$
withInit
(
create
n
)
(
\
q
->
mapM_
(`
elem
`
q
)
[
Block
i
|
i
<-
[
0
..
n
-
1
]])
mkBench
n
=
bench
(
show
n
++
" blocks"
)
$
withInit
(
create
n
)
(
\
q
->
mapM_
(`
elem
`
q
)
[
Block
i
|
i
<-
[
0
..
n
-
1
]
])
instance
NFData
(
BlockQueue
RealWorld
)
where
rnf
p
=
seq
p
()
...
...
@@ -68,7 +64,7 @@ instance NFData (BlockQueue RealWorld) where
create
::
Int
->
ST
s
(
BlockQueue
s
)
create
n
=
do
q
<-
empty
n
mapM_
(
enqueue
q
.
Block
)
[
0
..
n
-
1
]
mapM_
(
enqueue
q
.
Block
)
[
0
..
n
-
1
]
return
q
withInit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment