Skip to content

Commit

Permalink
Benchmark numbers for llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
phischu committed Feb 6, 2025
1 parent e70680d commit e42703c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
16 changes: 8 additions & 8 deletions examples/benchmarks/config_llvm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ effect_handlers_bench/product_early 262144
effect_handlers_bench/resume_nontail 65536
effect_handlers_bench/tree_explore 17
effect_handlers_bench/triples 512
input_output/dyck_one 5
input_output/financial_format 5
input_output/interleave_promises 5
input_output/large_file 5
input_output/number_matrix 5
input_output/small_files 5
input_output/word_count_ascii 5
input_output/word_count_utf8 5
input_output/large_file 10000
input_output/small_files 10000
input_output/interleave_promises 200
input_output/word_count_ascii 1000
input_output/word_count_utf8 2000
input_output/dyck_one 1000
input_output/number_matrix 500
input_output/financial_format 2000
8 changes: 6 additions & 2 deletions examples/benchmarks/input_output/dyck_one.effekt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ import stream
import scanner

// dyck_one.txt
// ((((()())(()())(()()))((()())(()())(()()))((()())(()())(()()))((()())(()())(()())))...
// (()()()()()(()()()()(()()()(()()(())))))

def emitTree(n: Int): Unit / emit[Byte] =
if (n <= 0) {
()
} else {
do emit(40.toByte)
repeat(n) { emitTree(n - 1) }
repeat(n) {
do emit(40.toByte)
do emit(41.toByte)
}
emitTree(n - 1)
do emit(41.toByte)
}

Expand Down
4 changes: 2 additions & 2 deletions examples/benchmarks/input_output/interleave_promises.effekt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def run(n: Int) = {
val filename = foldername ++ i.show ++ ".txt"
val file = openForWriting(filename)
val buffer = bytearray(size, 35.toByte)
repeat(8) {
repeat(n) {
val m = write(file, buffer, 0, size, -1)
if (m < buffer.size) {
panic("failed write")
Expand All @@ -40,7 +40,7 @@ def run(n: Int) = {
val filename = foldername ++ i.show ++ ".txt"
val file = openForReading(filename)
val buffer = bytearray::allocate(size)
repeat(8) {
repeat(n) {
val m = read(file, buffer, 0, size, -1)
if (m < buffer.size) {
panic("failed read")
Expand Down

0 comments on commit e42703c

Please sign in to comment.