kkebo / zyphy

Zyphy is (or will be) a fast web browser engine written in Swift.
MIT License
4 stars 1 forks source link

perf(Tokenizer): improve performance #109

Closed kkebo closed 1 month ago

kkebo commented 1 month ago

Comparing results between 'main' and 'Current_run'

Host 'Brown-rhinoceros-beetle' with 8 'aarch64' processors with 7 GB memory, running:                                                                                                    
#1 SMP PREEMPT_DYNAMIC Sat Aug  3 22:26:24 UTC 2024                                                                                                                                      

MyBenchmark

lipsum metrics

Time (wall clock): results within specified thresholds, fold down for details.

| Time (wall clock) (μs) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples | |:----------------------------------------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:| | main | 14 | 14 | 14 | 14 | 14 | 15 | 15 | 100 | | Current_run | 13 | 14 | 14 | 14 | 14 | 15 | 15 | 100 | | Δ | -1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | Improvement % | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

lipsum-zh metrics

Time (wall clock): results within specified thresholds, fold down for details.

| Time (wall clock) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples | |:----------------------------------------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:| | main | 1550 | 1554 | 1558 | 1564 | 1585 | 1798 | 1799 | 100 | | Current_run | 1548 | 1553 | 1559 | 1564 | 1572 | 1670 | 1673 | 100 | | Δ | -2 | -1 | 1 | 0 | -13 | -128 | -126 | 0 | | Improvement % | 0 | 0 | 0 | 0 | 1 | 7 | 7 | 0 |

medium-fragment metrics

Time (wall clock): results within specified thresholds, fold down for details.

| Time (wall clock) (μs) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples | |:----------------------------------------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:| | main | 41 | 41 | 41 | 41 | 41 | 44 | 44 | 100 | | Current_run | 41 | 41 | 41 | 41 | 41 | 43 | 43 | 100 | | Δ | 0 | 0 | 0 | 0 | 0 | -1 | -1 | 0 | | Improvement % | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 |

small-fragment metrics

Time (wall clock): results within specified thresholds, fold down for details.

| Time (wall clock) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples | |:----------------------------------------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:| | main | 4478 | 4485 | 4493 | 4641 | 4649 | 4657 | 4688 | 100 | | Current_run | 4506 | 4514 | 4522 | 4669 | 4674 | 4682 | 4682 | 100 | | Δ | 28 | 29 | 29 | 28 | 25 | 25 | -6 | 0 | | Improvement % | -1 | -1 | -1 | -1 | -1 | -1 | 0 | 0 |

strong metrics

Time (wall clock): results within specified thresholds, fold down for details.

| Time (wall clock) (μs) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples | |:----------------------------------------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:| | main | 19 | 19 | 19 | 19 | 20 | 21 | 21 | 100 | | Current_run | 19 | 19 | 19 | 19 | 19 | 20 | 20 | 100 | | Δ | 0 | 0 | 0 | 0 | -1 | -1 | -1 | 0 | | Improvement % | 0 | 0 | 0 | 0 | 5 | 5 | 5 | 0 |

tiny-fragment metrics

Time (wall clock): results within specified thresholds, fold down for details.

| Time (wall clock) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples | |:----------------------------------------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:| | main | 488 | 529 | 614 | 672 | 675 | 903 | 903 | 100 | | Current_run | 452 | 456 | 458 | 487 | 911 | 976 | 977 | 100 | | Δ | -36 | -73 | -156 | -185 | 236 | 73 | 74 | 0 | | Improvement % | 7 | 14 | 25 | 28 | -35 | -8 | -8 | 0 |

github-actions[bot] commented 1 month ago

Code Metrics Report

main (579897a) #109 (f6ed9c6) +/-
Coverage 85.4% 85.2% -0.2%
Details ``` diff | | main (579897a) | #109 (f6ed9c6) | +/- | |-----------|----------------|----------------|-------| - | Coverage | 85.4% | 85.2% | -0.2% | | Files | 9 | 9 | 0 | | Lines | 1595 | 1595 | 0 | - | Covered | 1363 | 1360 | -3 | ```

Code coverage of files in pull request scope (83.2% → 83.0%)

Files Coverage +/-
Sources/Tokenizer/Tokenizer.swift 83.0% -0.3%

Reported by octocov

github-actions[bot] commented 1 month ago

Code Metrics Report

main (999d317) #109 (3fab4f5) +/-
Coverage 85.4% 85.2% -0.2%
Details ``` diff | | main (999d317) | #109 (3fab4f5) | +/- | |-----------|----------------|----------------|-------| - | Coverage | 85.4% | 85.2% | -0.2% | | Files | 9 | 9 | 0 | | Lines | 1587 | 1591 | +4 | + | Covered | 1356 | 1357 | +1 | ```

Code coverage of files in pull request scope (83.2% → 83.0%)

Files Coverage +/-
Sources/Tokenizer/Tokenizer.swift 83.0% -0.2%

Reported by octocov