diff --git a/README.md b/README.md index 64e20cfd..960eaf2a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The name of this repository is a pun on two meanings of "time to": "how much tim | Nim | 40.8ms | 84 | | Lua (LuaJIT) | 69.9ms | 82 | | OCaml (flambda) | 187.9ms | 123 | -| Squiggle (bun) | 0.538s | 14* | +| Squiggle (bun) | 0.387s | 14* | | Javascript (node) | 0.445s | 69 | | SquigglePy (v0.27) | 1.507s | 18* | | R (3.6.1) | 4.508s | 49 | diff --git a/squiggle.c/makefile b/squiggle.c/makefile index b1fdbf33..8a05d723 100644 --- a/squiggle.c/makefile +++ b/squiggle.c/makefile @@ -1,5 +1,8 @@ OUTPUT=./samples +build: + gcc -O3 samples.c ./squiggle_c/squiggle.c ./squiggle_c/squiggle_more.c -lm -fopenmp -o $(OUTPUT) + install: rm -r squiggle_c git clone https://git.nunosempere.com/personal/squiggle.c @@ -8,9 +11,6 @@ install: cp -r squiggle_c/examples/more/12_time_to_botec_parallel/example.c samples.c sed -i 's|../../..|squiggle_c|' samples.c -build: - gcc -O3 samples.c ./squiggle_c/squiggle.c ./squiggle_c/squiggle_more.c -lm -fopenmp -o $(OUTPUT) - time-linux: @echo "Running 100x and taking avg time: OMP_NUM_THREADS=16 $(OUTPUT)" @t=$$(/usr/bin/time -f "%e" -p bash -c 'for i in {1..100}; do OMP_NUM_THREADS=16 $(OUTPUT); done' 2>&1 >/dev/null | grep real | awk '{print $$2}' ); echo "scale=2; 1000 * $$t / 100" | bc | sed "s|^|Time using 16 threads: |" | sed 's|$$|ms|' && echo diff --git a/squiggle.c/squiggle_c/README.md b/squiggle.c/squiggle_c/README.md index 09489b2a..09153259 100644 --- a/squiggle.c/squiggle_c/README.md +++ b/squiggle.c/squiggle_c/README.md @@ -248,18 +248,18 @@ make tidy It emits one warning about something I already took care of, so by default I've suppressed it. I think this is good news in terms of making me more confident that this simple library is correct :). -### Division between core functions and extraneous expansions +### Division between core functions and squiggle_moreneous expansions -This library differentiates between core functions, which are pretty tightly scoped, and expansions and convenience functions, which are more meandering. Expansions are in `extra.c` and `extra.h`. To use them, take care to link them: +This library differentiates between core functions, which are pretty tightly scoped, and expansions and convenience functions, which are more meandering. Expansions are in `squiggle_more.c` and `squiggle_more.h`. To use them, take care to link them: ``` // In your C source file -#include "extra.h" +#include "squiggle_more.h" ``` ``` # When compiling: -gcc -std=c99 -Wall -O3 example.c squiggle.c extra.c -lm -o ./example +gcc -std=c99 -Wall -O3 example.c squiggle.c squiggle_more.c -lm -o ./example ``` @@ -290,6 +290,13 @@ Behaviour on error can be toggled by the `EXIT_ON_ERROR` variable. This library Overall, I'd describe the error handling capabilities of this library as pretty rudimentary. For example, this program might fail in surprising ways if you ask for a lognormal with negative standard deviation, because I haven't added error checking for that case yet. +## Extra: confidence intervals + +// to do + +## Extra paralellism + +// to do ## Related projects