Crates.io | whitespacers |
lib.rs | whitespacers |
version | 1.1.0 |
source | src |
created_at | 2016-10-20 01:55:10.906897 |
updated_at | 2024-04-26 09:58:56.422676 |
description | A whitespace JIT-compiler, for when your whitespace just isn't executing fast enough. |
homepage | |
repository | https://github.com/CensoredUsername/whitespace-rs |
max_upload_size | |
id | 6912 |
size | 224,236 |
Whitespacers offers several interpretation methods. These benchmarks show the difference between the techniques and fallbacks. These benchmarks were created by executing wsinterws.ws (a whitespace interpreter written in whitespace) on this whitespace program. Correct execution requires the execution of 3.329.985.013 whitespace instructions. Executing this program requires --unchecked-heap.
The time mentioned is purely the execution time. Other operations are very insignificant compared to it as the second largest time consumer is parsing at approximately 0.001 s.
The used machine for benchmarking is a 2.6 GHz i7-4720HQ.
Execution tactic | Time [s] | whitespace instructions per second |
---|---|---|
The fallback bignum interpreter | 193.514444790 | 17.207.940 |
The reference interpreter | 35.265381255 | 94.426.457 |
Optimized interpretation | 12.077388375 | 275.720.620 |
JIT-compilation | 3.311839939 | 1.005.478.849 |
It should however be noted that this benchmark is heap-heavy code. In pure stack code speeds in excess of 3.000.000.000 instructions per second have been reached.
Documentation is available here.
Just run cargo run --release
to run the interpreter. The library can also be downloaded directly from crates.io.
MPL-2.0, see LICENSE