add benchmarks

This commit is contained in:
2025-06-14 17:02:36 -05:00
parent 38a52fcb73
commit fa12281ab9
11 changed files with 863 additions and 42 deletions

11
benchmarks/montecarlo.ce Normal file
View File

@@ -0,0 +1,11 @@
var N = 10000000;
var num = 0;
for (var i = 0; i < N; i ++) {
var x = 2 * $_.random();
var y = $_.random();
if (y < Math.sin(x * x))
num++;
}
log.console(2 * num / N);
$_.stop()