aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-09 18:55:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-09 18:55:41 +0000
commitae75a7933f38def7ce559f0e197105d9eeff732a (patch)
tree4b7f210fffd2daa5c24c4fbd3cb23adb9c778f48
parentmain: log architecture at startup (diff)
doc: benchmark: describe _why_ Alacritty is so fast in 'unicode-random'
-rw-r--r--doc/benchmark.md43
1 files changed, 29 insertions, 14 deletions
diff --git a/doc/benchmark.md b/doc/benchmark.md
index ce3f98e9..e92afe17 100644
--- a/doc/benchmark.md
+++ b/doc/benchmark.md
@@ -40,13 +40,13 @@ Scrollback: 10000 lines
### Results
-| Benchmark | Foot (GCC+PGO) 1.3.0.r59 | Alacritty 0.4.3 | URxvt 9.22 | XTerm 356 |
-|------------------------|-------------------------:|----------------:|---------------:|---------------:|
-| alt-random | 0.450s ±0.009 | 0.905s ±0.003 | 1.151s ±0.004 | 12.906s ±0.078 |
-| alt-random-colors | 0.451s ±0.013 | 0.931s ±0.005 | 1.192s ±0.005 | 11.858s ±0.155 |
-| scrolling | 1.181s ±0.036 | 1.096s ±0.022 | 1.080s ±0.007 | 38.244s ±0.118 |
-| scrolling-filled-lines | 0.878s ±0.015 | 1.320s ±0.040 | 1.251s ±0.006 | 6.812s ±0.031 |
-| unicode-random | 0.926s ±1.179 | 0.089s ±0.001 | 24.039s ±3.559 | 26.558s ±3.841 |
+| Benchmark | Foot (GCC+PGO) 1.3.0.r59 | Alacritty 0.4.3 | URxvt 9.22 | XTerm 356 |
+|------------------------|-------------------------:|---------------------:|---------------:|---------------:|
+| alt-random | 0.450s ±0.009 | 0.905s ±0.003 | 1.151s ±0.004 | 12.906s ±0.078 |
+| alt-random-colors | 0.451s ±0.013 | 0.931s ±0.005 | 1.192s ±0.005 | 11.858s ±0.155 |
+| scrolling | 1.181s ±0.036 | 1.096s ±0.022 | 1.080s ±0.007 | 38.244s ±0.118 |
+| scrolling-filled-lines | 0.878s ±0.015 | 1.320s ±0.040 | 1.251s ±0.006 | 6.812s ±0.031 |
+| unicode-random | 0.926s ±1.179 | 0.089s ±0.001 [^1] | 24.039s ±3.559 | 26.558s ±3.841 |
@@ -73,10 +73,25 @@ Scrollback=10000 lines
### Results
-| Benchmark | Foot (GCC+PGO) 1.3.0.r59 | Alacritty 0.4.2 | URxvt 9.22 | St 0.8.3 | XTerm 356 |
-|------------------------|-------------------------:|----------------:|---------------:|--------------:|---------------:|
-| alt-random | 0.791s ±0.080 | 1.558s ±0.038 | 1.746s ±0.065 | 2.628s ±0.085 | 1.706s ±0.064 |
-| alt-random-colors | 0.830s ±0.076 | 1.587s ±0.041 | 2.049s ±0.118 | 3.033s ±0.129 | 2.109s ±0.131 |
-| scrolling | 1.603s ±0.070 | 1.464s ±0.098 | 1.439s ±0.035 | 3.760s ±0.113 | 1.459s ±0.036 |
-| scrolling-filled-lines | 1.888s ±0.021 | 2.334s ±0.078 | 2.145s ±0.074 | 3.372s ±0.078 | 2.144s ±0.091 |
-| unicode-random | 1.545s ±0.229 | 0.164s ±0.012 | 11.180s ±0.342 | crashed | 11.389s ±0.269 |
+| Benchmark | Foot (GCC+PGO) 1.3.0.r59 | Alacritty 0.4.2 | URxvt 9.22 | St 0.8.3 | XTerm 356 |
+|------------------------|-------------------------:|---------------------:|---------------:|--------------:|---------------:|
+| alt-random | 0.791s ±0.080 | 1.558s ±0.038 | 1.746s ±0.065 | 2.628s ±0.085 | 1.706s ±0.064 |
+| alt-random-colors | 0.830s ±0.076 | 1.587s ±0.041 | 2.049s ±0.118 | 3.033s ±0.129 | 2.109s ±0.131 |
+| scrolling | 1.603s ±0.070 | 1.464s ±0.098 | 1.439s ±0.035 | 3.760s ±0.113 | 1.459s ±0.036 |
+| scrolling-filled-lines | 1.888s ±0.021 | 2.334s ±0.078 | 2.145s ±0.074 | 3.372s ±0.078 | 2.144s ±0.091 |
+| unicode-random | 1.545s ±0.229 | 0.164s ±0.012 [^1] | 11.180s ±0.342 | crashed | 11.389s ±0.269 |
+
+
+[^1]: Alacritty is actually **really** slow at rendering this (whether
+ it is fallback fonts in general, emojis, or something else, I
+ don't know). I believe the reason it finishes the benchmark so
+ quickly is because it reads from the PTY in a separate thread,
+ into a larger receive buffer which is then consumed by the main
+ thread. This allows the client program to write its output much
+ faster since it is no longer stalling on a blocked PTY. This means
+ Alacritty only needs to render a couple of frames since it can
+ reach the final VT state almost immediately. On the other hand,
+ `cat`:ing the `unicode-random` test file in an endless loop, or
+ just manually scrolling up after the benchmark is done is
+ **slow**, which besides being felt (input lag), can be seen by
+ setting `debug.render_timer = true` in `alacritty.yml`.