Skip to content

Commit e3622cd

Browse files
authored
Fix optimization documentation
1 parent a1b6da2 commit e3622cd

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

docs/optimization.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ All benchmarking measures the _parsing and drawing_ time for different complex f
2727
| **This (Web)** | Yes | 4.14 ms | **2.42 ms** | **2.27 ms** |
2828
| **This (Desktop)**| Yes | **2.91 ms** | 3.93 ms | 3.14 ms |
2929

30-
It is important to notice that the web version outperforms the desktop version for small functions. This is likely due to optimizations introduced in the Emscripten to WebAssembly optimizations, besides the transpilation from OpenGL to WebGL.
30+
It is important to notice that the web version outperforms the desktop version for small functions. This is likely due to optimizations introduced in the Emscripten to WebAssembly optimizations, besides the transpilation from OpenGL to WebGL. It is also to note that this was tested in a non-optimized version (not compiled with the `-O3` flag), while the web version is.
3131

3232
It can be observed from the table that this tool outperforms all of its other competitors. This is due to our optimizations!
3333

@@ -66,8 +66,7 @@ In the now deprecated arbitrary-precision math library for the GPU, registers we
6666
Also, this library uses non-functional math. This means that rather than functions returning a new copy to their result, they modify a given register. Such an example is the hp_add function:
6767
```glsl
6868
number R[16];
69-
number hp_add(number a, number b){
70-
void hp_add(in number a, in number b, out number res) {
69+
void hp_add(in number a, in number b, out number res) {
7170
if (a.sign == b.sign) {
7271
abs_sum(a, b, R[0]);
7372
res.sign = a.sign;
@@ -84,5 +83,5 @@ number hp_add(number a, number b){
8483
R[0].sign = b.sign;
8584
res = R[0];
8685
}
87-
}
88-
```
86+
87+
```

0 commit comments

Comments
 (0)