time.txt (13646B)
1 # bc 2 time ghbc -l squiggle.bc estimate.bc 3 .8880956915396169 4 5 real 0m15.941s 6 user 0m15.936s 7 sys 0m0.000s 8 9 10 # C 11 Running 100x and taking avg time: OMP_NUM_THREADS=16 out/samples 12 Time using 16 threads: 6.10ms 13 14 15 16 # js (bun) 17 0.8890972216037947 18 19 real 0m0.592s 20 user 0m0.560s 21 sys 0m0.047s 22 23 24 # js (node) 25 0.8886602152847817 26 27 real 0m0.404s 28 user 0m0.518s 29 sys 0m0.081s 30 31 32 # lua (luajit) 33 Requires /bin/time, found on GNU/Linux systems 34 35 Running 100x and taking avg time of: luajit samples.lua 36 Time: 67.90ms 37 38 39 40 # nim 41 Requires /bin/time, found on GNU/Linux systems 42 43 Running 100x and taking avg time of: 44 Time: 41.00ms 45 46 47 48 # ocaml 49 Requires /bin/time, found on GNU/Linux systems 50 51 Running 100x and taking avg time of: 52 Time: 185.50ms 53 54 55 56 # Python (3.9) 57 0.8887373869178242 58 59 real 0m12.096s 60 user 0m12.307s 61 sys 0m1.081s 62 63 64 # Python (numpy) 65 0.8887373869178242 66 67 real 0m11.907s 68 user 0m12.180s 69 sys 0m1.092s 70 71 72 # R (3.6.1) 73 [1] 0.8875992 74 75 real 0m4.567s 76 user 0m4.532s 77 sys 0m0.029s 78 79 80 # Squiggle (0.8.6) 81 Requires /bin/time, found on GNU/Linux systems 82 83 Running 100x and taking avg time of: 84 Time: 379.80ms 85 86 87 88 # SquigglePy (0.27) 89 time python3.9 samples.py 90 0%| | 0/4 [00:00<?, ?it/s] 75%|███████▌ | 3/4 [00:00<00:00, 25.71it/s]100%|██████████| 4/4 [00:00<00:00, 21.89it/s] 91 0%| | 0/1000000 [00:00<?, ?it/s] 10%|█ | 100926/1000000 [00:00<00:00, 1009253.74it/s] 23%|██▎ | 233593/1000000 [00:00<00:00, 1195967.71it/s] 37%|███▋ | 369110/1000000 [00:00<00:00, 1268660.47it/s] 51%|█████ | 506546/1000000 [00:00<00:00, 1310386.16it/s] 65%|██████▍ | 647417/1000000 [00:00<00:00, 1345838.18it/s] 79%|███████▉ | 787714/1000000 [00:00<00:00, 1365262.30it/s] 93%|█████████▎| 929866/1000000 [00:00<00:00, 1383650.33it/s]100%|██████████| 1000000/1000000 [00:00<00:00, 1321333.61it/s] 92 0.8885170299156587 93 94 real 0m1.534s 95 user 0m1.951s 96 sys 0m2.252s 97 98 99 # squiggle.c 100 rm -r squiggle_c 101 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.c 102 --2024-02-25 00:21:11-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.c 103 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 104 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 105 HTTP request sent, awaiting response... 200 OK 106 Length: 7942 (7.8K) [text/plain] 107 Saving to: ‘squiggle.c’ 108 109 0K ....... 100% 1.24G=0s 110 111 2024-02-25 00:21:13 (1.24 GB/s) - ‘squiggle.c’ saved [7942/7942] 112 113 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.h 114 --2024-02-25 00:21:13-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.h 115 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 116 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 117 HTTP request sent, awaiting response... 200 OK 118 Length: 1348 (1.3K) [text/plain] 119 Saving to: ‘squiggle.h’ 120 121 0K . 100% 284M=0s 122 123 2024-02-25 00:21:15 (284 MB/s) - ‘squiggle.h’ saved [1348/1348] 124 125 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.c 126 --2024-02-25 00:21:15-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.c 127 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 128 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 129 HTTP request sent, awaiting response... 200 OK 130 Length: 15606 (15K) [text/plain] 131 Saving to: ‘squiggle_more.c’ 132 133 0K .......... ..... 100% 99.8M=0s 134 135 2024-02-25 00:21:17 (99.8 MB/s) - ‘squiggle_more.c’ saved [15606/15606] 136 137 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.h 138 --2024-02-25 00:21:17-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.h 139 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 140 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 141 HTTP request sent, awaiting response... 200 OK 142 Length: 1111 (1.1K) [text/plain] 143 Saving to: ‘squiggle_more.h’ 144 145 0K . 100% 244M=0s 146 147 2024-02-25 00:21:18 (244 MB/s) - ‘squiggle_more.h’ saved [1111/1111] 148 149 mkdir temp 150 mv squiggle* temp 151 mv temp squiggle_c 152 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/examples/more/12_time_to_botec_parallel/example.c -O samples.c 153 --2024-02-25 00:21:18-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/examples/more/12_time_to_botec_parallel/example.c 154 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 155 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 156 HTTP request sent, awaiting response... 200 OK 157 Length: 1022 [text/plain] 158 Saving to: ‘samples.c’ 159 160 0K 100% 248M=0s 161 162 2024-02-25 00:21:20 (248 MB/s) - ‘samples.c’ saved [1022/1022] 163 164 sed -i 's|../../..|squiggle_c|' samples.c 165 gcc -O3 samples.c ./squiggle_c/squiggle.c ./squiggle_c/squiggle_more.c -lm -fopenmp -o ./samples 166 Running 1000x and taking avg time: OMP_NUM_THREADS=16 ./samples 167 Time using 16 threads: 8.69ms 168 169 170 171 # squiggle.c 172 rm -r squiggle_c 173 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.c 174 --2024-02-25 00:21:29-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.c 175 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 176 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 177 HTTP request sent, awaiting response... 200 OK 178 Length: 7942 (7.8K) [text/plain] 179 Saving to: ‘squiggle.c’ 180 181 0K ....... 100% 1.98G=0s 182 183 2024-02-25 00:21:32 (1.98 GB/s) - ‘squiggle.c’ saved [7942/7942] 184 185 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.h 186 --2024-02-25 00:21:32-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.h 187 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 188 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 189 HTTP request sent, awaiting response... 200 OK 190 Length: 1348 (1.3K) [text/plain] 191 Saving to: ‘squiggle.h’ 192 193 0K . 100% 277M=0s 194 195 2024-02-25 00:21:33 (277 MB/s) - ‘squiggle.h’ saved [1348/1348] 196 197 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.c 198 --2024-02-25 00:21:33-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.c 199 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 200 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 201 HTTP request sent, awaiting response... 200 OK 202 Length: 15606 (15K) [text/plain] 203 Saving to: ‘squiggle_more.c’ 204 205 0K .......... ..... 100% 102M=0s 206 207 2024-02-25 00:21:35 (102 MB/s) - ‘squiggle_more.c’ saved [15606/15606] 208 209 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.h 210 --2024-02-25 00:21:35-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.h 211 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 212 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 213 HTTP request sent, awaiting response... 200 OK 214 Length: 1111 (1.1K) [text/plain] 215 Saving to: ‘squiggle_more.h’ 216 217 0K . 100% 490M=0s 218 219 2024-02-25 00:21:36 (490 MB/s) - ‘squiggle_more.h’ saved [1111/1111] 220 221 mkdir temp 222 mv squiggle* temp 223 mv temp squiggle_c 224 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/examples/more/15_time_to_botec_custom_mixture/example.c -O samples.c 225 --2024-02-25 00:21:36-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/examples/more/15_time_to_botec_custom_mixture/example.c 226 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 227 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 228 HTTP request sent, awaiting response... 200 OK 229 Length: 795 [text/plain] 230 Saving to: ‘samples.c’ 231 232 0K 100% 256M=0s 233 234 2024-02-25 00:21:38 (256 MB/s) - ‘samples.c’ saved [795/795] 235 236 sed -i 's|../../..|squiggle_c|' samples.c 237 # https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html 238 rm -f *.gcda 239 gcc -Ofast -fprofile-generate -funit-at-a-time -march=native -fno-math-errno -ffast-math -std=gnu99 -fno-unroll-loops -flto samples.c ./squiggle_c/squiggle.c ./squiggle_c/squiggle_more.c -lm -fopenmp -o ./samples 240 ././samples 241 Avg: 0.888998 242 gcc -Ofast -fprofile-use -funit-at-a-time -march=native -fno-math-errno -ffast-math -std=gnu99 -fno-unroll-loops -flto samples.c ./squiggle_c/squiggle.c ./squiggle_c/squiggle_more.c -lm -fopenmp -o ./samples 243 rm *.gcda 244 # Using -Ofast increases speed a bit, but I don't trust it. <https://stackoverflow.com/questions/61232427/gcc-differences-between-o3-vs-ofast-optimizations> 245 Running 1000x and taking avg time: OMP_NUM_THREADS=16 ./samples 246 Time using 16 threads: 4.95ms 247 248 249 250 # squiggle.c (danger mode) 251 rm -r squiggle_c 252 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.c 253 --2024-02-25 00:21:44-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.c 254 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 255 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 256 HTTP request sent, awaiting response... 200 OK 257 Length: 7942 (7.8K) [text/plain] 258 Saving to: ‘squiggle.c’ 259 260 0K ....... 100% 1.26G=0s 261 262 2024-02-25 00:21:46 (1.26 GB/s) - ‘squiggle.c’ saved [7942/7942] 263 264 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.h 265 --2024-02-25 00:21:46-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle.h 266 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 267 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 268 HTTP request sent, awaiting response... 200 OK 269 Length: 1348 (1.3K) [text/plain] 270 Saving to: ‘squiggle.h’ 271 272 0K . 100% 225M=0s 273 274 2024-02-25 00:21:47 (225 MB/s) - ‘squiggle.h’ saved [1348/1348] 275 276 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.c 277 --2024-02-25 00:21:47-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.c 278 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 279 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 280 HTTP request sent, awaiting response... 200 OK 281 Length: 15606 (15K) [text/plain] 282 Saving to: ‘squiggle_more.c’ 283 284 0K .......... ..... 100% 103M=0s 285 286 2024-02-25 00:21:49 (103 MB/s) - ‘squiggle_more.c’ saved [15606/15606] 287 288 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.h 289 --2024-02-25 00:21:49-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/squiggle_more.h 290 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 291 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 292 HTTP request sent, awaiting response... 200 OK 293 Length: 1111 (1.1K) [text/plain] 294 Saving to: ‘squiggle_more.h’ 295 296 0K . 100% 219M=0s 297 298 2024-02-25 00:21:56 (219 MB/s) - ‘squiggle_more.h’ saved [1111/1111] 299 300 mkdir temp 301 mv squiggle* temp 302 mv temp squiggle_c 303 wget https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/examples/more/15_time_to_botec_custom_mixture/example.c -O samples.c 304 --2024-02-25 00:21:56-- https://git.nunosempere.com/personal/squiggle.c/raw/branch/master/examples/more/15_time_to_botec_custom_mixture/example.c 305 Resolving git.nunosempere.com (git.nunosempere.com)... 164.92.249.28 306 Connecting to git.nunosempere.com (git.nunosempere.com)|164.92.249.28|:443... connected. 307 HTTP request sent, awaiting response... 200 OK 308 Length: 795 [text/plain] 309 Saving to: ‘samples.c’ 310 311 0K 100% 184M=0s 312 313 2024-02-25 00:21:59 (184 MB/s) - ‘samples.c’ saved [795/795] 314 315 sed -i 's|../../..|squiggle_c|' samples.c 316 # https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html 317 rm -f *.gcda 318 gcc -Ofast -fprofile-generate -funit-at-a-time -march=native -fno-math-errno -ffast-math -std=gnu99 -fno-unroll-loops -flto samples.c ./squiggle_c/squiggle.c ./squiggle_c/squiggle_more.c -lm -fopenmp -o ./samples 319 ././samples 320 Avg: 0.888998 321 gcc -Ofast -fprofile-use -funit-at-a-time -march=native -fno-math-errno -ffast-math -std=gnu99 -fno-unroll-loops -flto samples.c ./squiggle_c/squiggle.c ./squiggle_c/squiggle_more.c -lm -fopenmp -o ./samples 322 rm *.gcda 323 # Using -Ofast increases speed a bit, but I don't trust it. <https://stackoverflow.com/questions/61232427/gcc-differences-between-o3-vs-ofast-optimizations> 324 Running 1000x and taking avg time: OMP_NUM_THREADS=16 ./samples 325 Time using 16 threads: 4.44ms 326 327 328 329 # squiggle.go 330 Running 100x and taking avg time: ./squiggle 331 Time using 16 threads: 21.30ms 332 333 334 # Python (numpy) 335 Mean result: 0.8848672124030412 336 Mean result: 0.8848672124030412