Commit Graph

5 Commits

Author SHA1 Message Date
Bob Nystrom
2f37b99eef feat: add JavaScript binary tree benchmark and update runner with trial count and graph improvements 2013-11-30 04:25:00 +00:00
Bob Nystrom
50b1a381e0 feat: add binary_trees benchmark suite and fix string escape for tab character
Add Lua, Python, Ruby, and Wren implementations of the binary_trees benchmark from the Computer Language Benchmarks Game. Update the benchmark runner to support multiple benchmarks with output validation, and fix the Wren compiler to handle the '\t' escape sequence in string literals.
2013-11-30 00:19:13 +00:00
Bob Nystrom
4f73052934 feat: add JavaScript benchmark runner with fib(30) test and node integration
Add a new JavaScript benchmark file `benchmark/fib.js` that implements a recursive Fibonacci function and measures execution time using `process.hrtime()`. Register the JavaScript language entry in `benchmark/run_all` with the `node` interpreter and `.js` extension, enabling JS benchmarks to be included in the full benchmark suite alongside existing languages.
2013-11-26 15:50:12 +00:00
Bob Nystrom
65615f4aa8 feat: add ASCII art graph of benchmark results with configurable trial count
Extract hardcoded trial count into NUM_TRIALS constant set to 7, collect all timing results into a list, and add graph_results function that prints a horizontal ASCII bar chart scaling each run's times relative to the global maximum across all benchmarks and languages.
2013-11-22 17:17:45 +00:00
Bob Nystrom
95faef89d5 feat: add benchmark runner with fib implementations and OS.clock primitive
Add a benchmark runner script (benchmark/run_all) that executes multiple
fibonacci implementations across languages (Lua, Python, Ruby, Wren) and
computes mean, median, and standard deviation from 7 runs. Update existing
fib benchmarks to loop 5 times at fib(30) with elapsed timing. Introduce
OS.clock primitive in C core and OS class to support timing in Wren.
Adjust number formatting to "%.14g" for consistent output precision.
2013-11-22 16:55:22 +00:00