Skip to content

Commit

Permalink
Made recfib benchmark faster
Browse files Browse the repository at this point in the history
  • Loading branch information
Melchizedek6809 committed Apr 25, 2024
1 parent 2976d69 commit 62e53fc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benchmark/recfib/fib.nuj
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
((= 1 n) 1)
(#t (+ (fib (- n 1)) (fib (- n 2))))))

(pfmtln "fib(40) is: {}\nGC Runs: {}" (fib 40) (garbage-collection-runs))
(pfmtln "fib(30) is: {}\nGC Runs: {}" (fib 30) (garbage-collection-runs))
4 changes: 2 additions & 2 deletions benchmark/recfib/fib.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
((= 1 n) 1)
(#t (+ (fib (- n 1)) (fib (- n 2))))))

(display "fib(40) = ")
(display (fib 40))
(display "fib(30) = ")
(display (fib 30))
(display "\n")
4 changes: 2 additions & 2 deletions tools/benchmark-sync.nuj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env nujel
(popen "rsync -avhe ssh web/benchmark-results/ wolkenwelten.net:/srv/http/nujel.net-performance/benchmark-results/")
(popen "rsync -avhe ssh web/benchmark-results/ wolkenwelten.net:~/http/nujel.net/performance/benchmark-results/")
(popen "rsync -avhe ssh wolkenwelten.net:~/http/nujel.net/performance/benchmark-results/ web/benchmark-results/")
(popen "./tools/benchmark-aggregate.nuj")
(popen "rsync -avhe ssh web/ wolkenwelten.net:~/http/nujel.net/performance/benchmark-results/")
(popen "rsync -avhe ssh web/ wolkenwelten.net:~/http/nujel.net/performance/")
2 changes: 1 addition & 1 deletion tools/benchmark.nuj
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
("crc32" "0936343A")
("compile-stdlib" "Image built")
("adler32" "E50BA232")
("recfib" "102334155")
("recfib" "832040")
(otherwise "チーズスイートホーム")))

(def time-template "#@(:user %U :system %S :elapsed \\\"%E\\\" :cpu \\\"%P\\\" :text %X :data %D :max-resident %M :inputs %I :outputs %O :pagefaults-major %F :pagefaults-minor %R :swaps %W)")
Expand Down

0 comments on commit 62e53fc

Please sign in to comment.