time-to-botec/time.txt

162 lines
3.2 KiB
Plaintext
Raw Normal View History

2023-05-29 23:40:03 +00:00
# Optimized C
2023-06-03 10:21:59 +00:00
$ make && make time-linux
gcc -O3 samples.c -fopenmp -lm -o out/samples
2023-06-02 22:24:08 +00:00
Requires /bin/time, found on GNU/Linux systems
2023-05-29 23:40:03 +00:00
2023-06-02 22:24:08 +00:00
Running 100x and taking avg time: OMP_NUM_THREADS=1 out/samples
2023-06-03 10:21:59 +00:00
Time using 1 thread: 20.20ms
2023-05-29 23:40:03 +00:00
2023-06-02 22:24:08 +00:00
Running 100x and taking avg time: OMP_NUM_THREADS=2 out/samples
2023-06-03 10:21:59 +00:00
Time using 2 threads: 17.50ms
2023-06-02 22:24:08 +00:00
Running 100x and taking avg time: OMP_NUM_THREADS=4 out/samples
2023-06-03 10:21:59 +00:00
Time for 4 threads: 17.00ms
2023-06-02 22:24:08 +00:00
Running 100x and taking avg time: OMP_NUM_THREADS=8 out/samples
2023-06-03 10:21:59 +00:00
Time using 8 threads: 8.40ms
2023-06-02 22:24:08 +00:00
Running 100x and taking avg time: OMP_NUM_THREADS=16 out/samples
2023-06-03 10:21:59 +00:00
Time using 16 threads: 5.00ms
2023-05-29 23:40:03 +00:00
# C
2023-05-21 16:05:15 +00:00
## normal compilation
0.888458
real 0m0,442s
user 0m0,378s
sys 0m0,064s
2023-05-21 16:05:15 +00:00
## -Ofast
0.888458
real 0m0.292s
user 0m0.266s
sys 0m0.026s
# Squiggle
2022-12-03 13:15:28 +00:00
real 0m1,536s
user 0m1,564s
sys 0m0,240s
# NodeJS
0.8849940532403973
real 0m0,732s
user 0m0,769s
sys 0m0,131s
## Python
0.8887373869178242
real 0m16,641s
user 0m16,693s
sys 0m0,517s
## R
[1] 0.885141
real 0m7,000s
user 0m6,944s
sys 0m0,052s
2023-05-21 05:46:45 +00:00
## Nim
2023-05-21 05:54:03 +00:00
nim c --verbosity:0 samples.nim && time ./samples --verbosity:0 && echo
2023-05-21 16:05:15 +00:00
0.8860780498240779
2023-05-21 05:54:03 +00:00
2023-05-21 16:05:15 +00:00
real 0m0.234s
user 0m0.214s
2023-05-21 05:54:03 +00:00
sys 0m0.020s
2023-05-21 05:46:45 +00:00
nim c --verbosity:0 -d:release samples.nim && time ./samples --verbosity:0 && echo
2023-05-21 16:05:15 +00:00
0.884035098700204
2023-05-21 05:46:45 +00:00
2023-05-21 16:05:15 +00:00
real 0m0.074s
user 0m0.043s
sys 0m0.031s
2023-05-21 05:46:45 +00:00
nim c --verbosity:0 -d:danger samples.nim && time ./samples --verbosity:0
2023-05-21 16:05:15 +00:00
0.8892827195895541
2023-05-21 05:46:45 +00:00
2023-05-21 16:05:15 +00:00
real 0m0.068s
user 0m0.048s
sys 0m0.020s
2023-06-09 01:12:07 +00:00
— make time-linux
Requires /bin/time, found on GNU/Linux systems
Running 100x and taking avg time of:
Time: 38.90ms
2023-06-09 01:12:07 +00:00
## Squigglepy
2023-06-10 01:12:33 +00:00
— time make run
python3 samples.py
100%|█████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 20.68it/s]
100%|████████████████████████████████████████████████████████████████████| 1000000/1000000 [00:00<00:00, 1298266.78it/s]
0.8854926010232937
real 0m1.602s
user 0m1.582s
sys 0m0.331s
## Lua
— make time-linux-simple
Requires /bin/time, found on GNU/Linux systems
/bin/time -f "Time: %es" lua samples.lua && echo
0.88932198462254
Time: 0.28s
— make time-linux
Requires /bin/time, found on GNU/Linux systems
Running 100x and taking avg time of: lua samples.lua
Time: 275.80ms
— make time-linux
Requires /bin/time, found on GNU/Linux systems
Running 100x and taking avg time of: luajit samples.lua
Time: 68.60ms
2023-08-17 12:36:03 +00:00
## squiggle.c
— make time-linux
Requires /bin/time, found on GNU/Linux systems
Running 100x and taking avg time example
Time using 1 thread: 37.60ms
2023-10-15 00:19:56 +00:00
## squiggle.ml
2023-10-15 01:29:29 +00:00
— make fast && time make run
ocamlopt -O3 -unsafe samples.ml -o ./out/samples
2023-10-15 00:19:56 +00:00
mv samples.cmi samples.cmx samples.o ./out/
2023-10-15 01:29:29 +00:00
./out/samples
Mean: 0.884629
2023-10-15 00:19:56 +00:00
2023-10-15 01:29:29 +00:00
real 0m0.164s
user 0m0.159s
sys 0m0.004s
2023-11-02 23:52:56 +00:00
## squiggle.bc
make time
time ghbc -l squiggle.bc estimate.bc
.8882048395568279
real 0m15.906s
user 0m15.900s
sys 0m0.000s