kkebo / zyphy

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

perf: make `CharRefTokenizer` non-copyable #107

Closed kkebo closed 2 months ago

github-actions[bot] commented 3 months ago

Code Metrics Report

main (2046b8e) #107 (6ab8f05) +/-
Coverage 85.2% 85.3% +0.0%
Details ``` diff | | main (2046b8e) | #107 (6ab8f05) | +/- | |-----------|----------------|----------------|-------| + | Coverage | 85.2% | 85.3% | +0.0% | | Files | 9 | 10 | +1 | | Lines | 1587 | 1591 | +4 | + | Covered | 1353 | 1358 | +5 | ```

Code coverage of files in pull request scope (85.2% → 85.3%)

Files Coverage +/-
Sources/Tokenizer/CharRefTokenizer.swift 98.1% +0.0%
Sources/Tokenizer/Optional+take.swift 100.0% +100.0%
Sources/Tokenizer/Tokenizer.swift 83.0% +0.0%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (2046b8e) #107 (cd9a2bb) +/-
Coverage 85.2% 85.3% +0.1%
Details ``` diff | | main (2046b8e) | #107 (cd9a2bb) | +/- | |-----------|----------------|----------------|-------| + | Coverage | 85.2% | 85.3% | +0.1% | | Files | 9 | 10 | +1 | | Lines | 1587 | 1600 | +13 | + | Covered | 1353 | 1366 | +13 | ```

Code coverage of files in pull request scope (85.2% → 85.3%)

Files Coverage +/-
Sources/Tokenizer/CharRefTokenizer.swift 98.1% +0.0%
Sources/Tokenizer/Optional+take.swift 100.0% +100.0%
Sources/Tokenizer/Tokenizer.swift 83.0% +0.0%

Reported by octocov

github-actions[bot] commented 2 months ago

Code Metrics Report

main (f6e9964) #107 (53b5aee) +/-
Coverage 85.3% 85.1% -0.2%
Details ``` diff | | main (f6e9964) | #107 (53b5aee) | +/- | |-----------|----------------|----------------|-------| - | Coverage | 85.3% | 85.1% | -0.2% | | Files | 9 | 10 | +1 | | Lines | 1586 | 1595 | +9 | + | Covered | 1353 | 1358 | +5 | ```

Code coverage of files in pull request scope (85.2% → 85.1%)

Files Coverage +/-
Sources/Tokenizer/CharRefTokenizer.swift 98.1% -0.1%
Sources/Tokenizer/Optional+take.swift 100.0% +100.0%
Sources/Tokenizer/Tokenizer.swift 82.8% -0.3%

Reported by octocov

github-actions[bot] commented 2 months ago

Code Metrics Report

main (530f1ae) #107 (be83aba) +/-
Coverage 85.3% 85.3% -0.1%
Details ``` diff | | main (530f1ae) | #107 (be83aba) | +/- | |-----------|----------------|----------------|-------| - | Coverage | 85.3% | 85.3% | -0.1% | | Files | 9 | 10 | +1 | | Lines | 1588 | 1594 | +6 | + | Covered | 1356 | 1361 | +5 | ```

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

Files Coverage +/-
Sources/Tokenizer/CharRefTokenizer.swift 98.1% 0.0%
Sources/Tokenizer/Optional+take.swift 100.0% +100.0%
Sources/Tokenizer/Tokenizer.swift 83.0% -0.1%

Reported by octocov

github-actions[bot] commented 2 months ago

Code Metrics Report

main (530f1ae) #107 (e0278e6) +/-
Coverage 85.3% 85.4% +0.0%
Details ``` diff | | main (530f1ae) | #107 (e0278e6) | +/- | |-----------|----------------|----------------|-------| + | Coverage | 85.3% | 85.4% | +0.0% | | Files | 9 | 10 | +1 | | Lines | 1588 | 1597 | +9 | + | Covered | 1356 | 1364 | +8 | ```

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

Files Coverage +/-
Sources/Tokenizer/CharRefTokenizer.swift 98.1% 0.0%
Sources/Tokenizer/Optional+take.swift 100.0% +100.0%
Sources/Tokenizer/Tokenizer.swift 83.1% -0.1%

Reported by octocov

github-actions[bot] commented 2 months ago

Code Metrics Report

main (530f1ae) #107 (6ea4acf) +/-
Coverage 85.3% 85.4% +0.0%
Details ``` diff | | main (530f1ae) | #107 (6ea4acf) | +/- | |-----------|----------------|----------------|-------| + | Coverage | 85.3% | 85.4% | +0.0% | | Files | 9 | 10 | +1 | | Lines | 1588 | 1594 | +6 | + | Covered | 1356 | 1362 | +6 | ```

Code coverage of files in pull request scope (85.3% → 85.4%)

Files Coverage +/-
Sources/Tokenizer/CharRefTokenizer.swift 98.1% 0.0%
Sources/Tokenizer/Optional+take.swift 100.0% +100.0%
Sources/Tokenizer/Tokenizer.swift 83.1% +0.0%

Reported by octocov

github-actions[bot] commented 2 months ago

Code Metrics Report

main (c968f88) #107 (d124cbd) +/-
Coverage 85.7% 85.6% -0.1%
Details ``` diff | | main (c968f88) | #107 (d124cbd) | +/- | |-----------|----------------|----------------|-------| - | Coverage | 85.7% | 85.6% | -0.1% | | Files | 9 | 10 | +1 | | Lines | 1586 | 1584 | -2 | - | Covered | 1360 | 1357 | -3 | ```

Code coverage of files in pull request scope (85.6% → 85.5%)

Files Coverage +/-
Sources/Tokenizer/CharRefTokenizer.swift 98.1% 0.0%
Sources/Tokenizer/Optional+take.swift 100.0% +100.0%
Sources/Tokenizer/Tokenizer.swift 83.3% -0.2%

Reported by octocov

kkebo commented 2 months ago

Comparing results between 'main' and 'Current_run'

Host 'Raspberry-beetle' with 4 'aarch64' processors with 7 GB memory, running:
#1 SMP PREEMPT Debian 1:6.6.47-1+rpt1 (2024-09-02)

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 | 24 | 24 | 24 | 24 | 24 | 25 | 25 | 100 | | Current_run | 23 | 23 | 23 | 23 | 24 | 24 | 24 | 100 | | Δ | -1 | -1 | -1 | -1 | 0 | -1 | -1 | 0 | | Improvement % | 4 | 4 | 4 | 4 | 0 | 4 | 4 | 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 | 3010 | 3017 | 3023 | 3033 | 3039 | 3142 | 3144 | 100 | | Current_run | 3106 | 3117 | 3123 | 3125 | 3133 | 3160 | 3173 | 100 | | Δ | 96 | 100 | 100 | 92 | 94 | 18 | 29 | 0 | | Improvement % | -3 | -3 | -3 | -3 | -3 | -1 | -1 | 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 | 71 | 71 | 71 | 71 | 71 | 72 | 72 | 100 | | Current_run | 68 | 68 | 68 | 68 | 68 | 68 | 69 | 100 | | Δ | -3 | -3 | -3 | -3 | -3 | -4 | -3 | 0 | | Improvement % | 4 | 4 | 4 | 4 | 4 | 6 | 4 | 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 | 7374 | 7414 | 7422 | 7434 | 7438 | 7475 | 7748 | 100 | | Current_run | 7423 | 7459 | 7496 | 7516 | 7528 | 7614 | 7969 | 100 | | Δ | 49 | 45 | 74 | 82 | 90 | 139 | 221 | 0 | | Improvement % | -1 | -1 | -1 | -1 | -1 | -2 | -3 | 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 | 35 | 35 | 35 | 35 | 35 | 35 | 35 | 100 | | Current_run | 35 | 35 | 35 | 35 | 35 | 35 | 35 | 100 | | Δ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | Improvement % | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 710 | 711 | 712 | 713 | 715 | 728 | 736 | 100 | | Current_run | 761 | 764 | 765 | 769 | 771 | 777 | 778 | 100 | | Δ | 51 | 53 | 53 | 56 | 56 | 49 | 42 | 0 | | Improvement % | -7 | -7 | -7 | -8 | -8 | -7 | -6 | 0 |