Just some cool shit I found while optimizing a function for a package I'm making:
>package summary: convert tabular data output from duckdb sql queries into elisp data structures (alist,vector,plist,hash,etc).
While adding a new format called columnar I was benchmarking the time it took to convert a 1 million row alist to it, these were the results for each method (N = iterations)
| Benchmark | Mean | Min | Max | N |
|-----------------------+-------+-------+-------+---|
| mapcar | 4.23s | 4.21s | 4.26s | 5 |
| pre-alloc-simple | 3.60s | 3.55s | 3.64s | 5 |
| pre-alloc-single-pass | 5.30s | 5.29s | 5.32s | 5 |
BUT, after running native-compile on the functions and then running the benchmark again.
| Benchmark | Mean | Min | Max | N |
|-----------------------+-------+-------+-------+---|
Comment too long. Click here to view the full text.