Update 'Performance'

master
John Zacarias Jekel 1 year ago
parent b9c1406960
commit a585546ae5
  1. 13
      Performance.md

@ -3,6 +3,7 @@
| Anslatortray Version | Time* in Regular mode (ns) | Time* in Byte-String Mode (ns) |
| -------- | -------- | -------- |
| main branch | 40.27 | 40.25 |
| 0.5.0 | 40.27 | 40.25 |
| 0.4.0 | 128.971 (old UTF-8 mode) | 93.986 (old ASCII mode) |
| 0.3.0 | 227.462 (old UTF-8 mode) | N/A |
@ -10,6 +11,18 @@
# Test results for the current Anslatortray main branch
On my dated system with dual Intel(R) Xeon(R) E5-2670 v2 CPUs, the `translate()` function can process one word every **40.27** nanoseconds on average in regular mode, and one word every **40.25** nanoseconds on average in byte string mode. The `words_alpha.txt` file from <https://github.com/dwyl/english-words> was fed to the `anslatortray --benchmark-file` set to 1000 iterations, and then the averages produced were divided by 370105 (the number of words in the file).
```
> anslatortray --benchmark-file ./words_alpha.txt 1000
Anslatortray: frontend for the Anslatortray for Rust library
Sucessful: Regular translation took 14903753ns to translate on average over 1000 runs.
Sucessful: Byte-string translation with reused allocations took 14897940ns to translate on average over 1000 runs.
```
# Test results for Anslatortray 0.5.0
From Anslatortray 0.4.0 to 0.5.0, the ASCII translation functions were removed, as were the UTF-8 translation functions. Instead, there are new "byte string" functions that operate on u8 slices and Vecs. In addition to being exposed to the user directly, they are also used to power the "regular" (originally called UTF-8) translation functions.
On my dated system with dual Intel(R) Xeon(R) E5-2670 v2 CPUs, the `translate()` function can process one word every **40.27** nanoseconds on average in regular mode, and one word every **40.25** nanoseconds on average in byte string mode. The `words_alpha.txt` file from <https://github.com/dwyl/english-words> was fed to the `anslatortray --benchmark-file` set to 1000 iterations, and then the averages produced were divided by 370105 (the number of words in the file).

Loading…
Cancel
Save