add initial OCaml stats
This commit is contained in:
parent
25a27f7fc4
commit
608cbb2f68
|
@ -27,6 +27,7 @@ The name of this repository is a pun on two meanings of "time to": "how much tim
|
|||
| C (optimized, 16 threads) | 5ms | 249 |
|
||||
| squiggle.c | 37ms | 54 |
|
||||
| Nim | 38ms | 84 |
|
||||
| OCaml | 42ms | 112 |
|
||||
| Lua (LuaJIT) | 68ms | 82 |
|
||||
| Lua | 278ms | 82 |
|
||||
| C (naïve implementation) | 292ms | 149 |
|
||||
|
@ -128,7 +129,7 @@ Overall I don't think that this is a fair comparison of the languages intrinsica
|
|||
- [ ] bc (the standard posix calculator)
|
||||
- [ ] Zig
|
||||
- [ ] Rust
|
||||
- [ ] OCaml
|
||||
- [x] OCaml
|
||||
- [ ] Forth
|
||||
- [ ] Julia (TuringML, MCHammer)
|
||||
- [ ] Lisp
|
||||
|
|
|
@ -5,10 +5,14 @@ CC=ocamlopt
|
|||
|
||||
# Main file
|
||||
SRC=samples.ml
|
||||
OUT=./out/samples
|
||||
|
||||
build: $(SRC)
|
||||
$(CC) $(SRC) -o out/samples
|
||||
$(CC) $(SRC) -o $(OUT)
|
||||
mv samples.cmi samples.cmx samples.o ./out/
|
||||
|
||||
run:
|
||||
./out/samples
|
||||
$(OUT)
|
||||
|
||||
time:
|
||||
bash -c "time $(OUT)"
|
||||
|
|
13
time.txt
13
time.txt
|
@ -138,3 +138,16 @@ Requires /bin/time, found on GNU/Linux systems
|
|||
Running 100x and taking avg time example
|
||||
Time using 1 thread: 37.60ms
|
||||
|
||||
## squiggle.ml
|
||||
|
||||
— make build && make time
|
||||
ocamlopt samples.ml -o ./out/samples
|
||||
mv samples.cmi samples.cmx samples.o ./out/
|
||||
bash -c "time ./out/samples"
|
||||
Mean: 0.884629
|
||||
|
||||
real 0m0.425s
|
||||
user 0m0.393s
|
||||
sys 0m0.032s
|
||||
|
||||
42ms
|
||||
|
|
Loading…
Reference in New Issue
Block a user