Skip to content

Commit 163bb05

Browse files
committed
feat(benchmark)!: remove "tag" argument from measureOnce
1 parent 610ec55 commit 163bb05

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Benchmark.ark

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
# @brief Measure the time it takes to run some given code, in milliseconds
2-
# @param tag Identifier for the code block (string)
1+
# @brief Measure the time it takes to run some given code, in milliseconds, and print the result
32
# @param code Node of code to run
43
# @author https://github.com/SuperFola
5-
(macro measureOnce (tag code) {
4+
(macro measureOnce (code) {
65
(mut _start (time))
76
{
87
code }
9-
(print (format "{} took {:.4} ms" tag (* 1000 (- (time) _start)))) })
8+
(print (format "{} took {:.4} ms" ($repr code) (* 1000 (- (time) _start)))) })
109

1110
(import std.List)
1211

13-
# @brief Benchmark some given code by running it a given number of times
12+
# @brief Benchmark some given code by running it a given number of times, and print a report
1413
# @param code code to run, eg. a function call
1514
# @param times number of times to run the code
1615
# =begin

0 commit comments

Comments
 (0)