1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/sync/bench/results.md

49 lines
2.4 KiB
Markdown

# Channel Benchmark Results
This documents lists several benchmark results for different platforms in order to
identify performance regressions and improvements.
The are measured using the command
```
> channel_bench_* <nsend> <nrec> <buflen> <nobj>
nsend ... number of threads that push objects into the channel
nrec .... number of threads that pop objects from the channel
buflen .. length of channel buffer queue - `0` means unbuffered channel
nobj .... number of objects to pass thru the channel
```
## AMD Ryzen 7 3800X, Ubuntu-20.04 x86_64
10000000 Objects transfered, results in Objects/µs
| nsend | nrec | buflen | **V (gcc -O2)** | **V (clang)** | **V (tcc)** | **Go (glang)** | **Go (gccgo -O2)** |
| :---: | :---:| :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | 1 | 0 | 0.95 | 0.72 | 0.66 | 4.65 | 0.56 |
| 1 | 1 | 100 | 3.26 | 2.51 | 2.24 | 18.90 | 6.08 |
| 4 | 4 | 0 | 0.25 | 0.26 | 0.24 | 1.84 | 0.84 |
| 4 | 4 | 100 | 3.11 | 2.78 | 2.63 | 7.43 | 3.71 |
## AMD Ryzen 7 3800X, Windows 10 2004 x64
| nsend | nrec | buflen | **V (gcc -O2)** | **V (msvc /O2)** | **V (tcc)** | **Go (golang)** |
| :---: | :---:| :---: | :---: | :---: | :---: | :---: |
| 1 | 1 | 0 | 0.30 | 0.33 | 0.31 | 4.67 |
| 1 | 1 | 100 | 1.76 | 2.05 | 1.76 | 23.31 |
| 4 | 4 | 0 | 0.18 | 0.19 | 0.19 | 1.38 |
| 4 | 4 | 100 | 2.54 | 2.32 | 2.07 | 4.63 |
## Raspberry Pi 3B+, Void Linux musl 32 bit
10000000 Objects transfered, results in Objects/µs
| nsend | nrec | buflen | **V (gcc -O2)** | **Go (glang)** |
| :---: | :---:| :---: | :---: | :---: |
| 1 | 1 | 0 | 0.37 | 0.21 |
| 1 | 1 | 100 | 1.03 | 0.74 |
| 4 | 4 | 0 | 0.04 | 0.38 |
| 4 | 4 | 100 | 2.78 | 2.63 |
| 2 | 2 | 0 | 0.05 | 0.38 |
| 2 | 2 | 100 | 1.26 | 0.75 |