kkebo / zyphy

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

refactor: replace `String` with `Str` #83

Closed kkebo closed 3 months ago

github-actions[bot] commented 5 months ago

Code Metrics Report

main (cd73634) #83 (fcd8a60) +/-
Coverage 89.1% 89.1% -0.1%
Details ``` diff | | main (cd73634) | #83 (fcd8a60) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 89.1% | 89.1% | -0.1% | | Files | 9 | 9 | 0 | | Lines | 1608 | 1607 | -1 | - | Covered | 1434 | 1433 | -1 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 100.0% 0.0%
Sources/Str/Str.swift 33.3% +33.3%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 97.7% -0.1%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 87.3% 0.0%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov

kkebo commented 5 months ago

This is a little bit slower than before.

Comparing results between 'main' and 'Current_run'

Host 'Brown-rhinoceros-beetle' with 8 'aarch64' processors with 7 GB memory, running:                                                                                                      
#1 SMP PREEMPT_DYNAMIC Mon May 27 16:05:41 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 | 15 | 16 | 16 | 100 | | Current_run | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 100 | | Δ | 1 | 1 | 1 | 1 | 0 | -1 | -1 | 0 | | Improvement % | -7 | -7 | -7 | -7 | 0 | 6 | 6 | 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 | 1579 | 1619 | 1626 | 1677 | 1811 | 1837 | 100 | | Current_run | 1597 | 1604 | 1607 | 1611 | 1665 | 1736 | 1757 | 100 | | Δ | 47 | 25 | -12 | -15 | -12 | -75 | -80 | 0 | | Improvement % | -3 | -2 | 1 | 1 | 1 | 4 | 4 | 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 | 44 | 44 | 44 | 44 | 44 | 47 | 47 | 100 | | Current_run | 44 | 44 | 44 | 44 | 44 | 45 | 46 | 100 | | Δ | 0 | 0 | 0 | 0 | 0 | -2 | -1 | 0 | | Improvement % | 0 | 0 | 0 | 0 | 0 | 4 | 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 | 4615 | 4620 | 4628 | 4641 | 4755 | 4776 | 4777 | 100 | | Current_run | 4660 | 4665 | 4669 | 4669 | 4674 | 4690 | 4825 | 100 | | Δ | 45 | 45 | 41 | 28 | -81 | -86 | 48 | 0 | | Improvement % | -1 | -1 | -1 | -1 | 2 | 2 | -1 | 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 | 20 | 20 | 20 | 20 | 20 | 21 | 21 | 100 | | Current_run | 19 | 19 | 20 | 20 | 20 | 21 | 21 | 100 | | Δ | -1 | -1 | 0 | 0 | 0 | 0 | 0 | 0 | | Improvement % | 5 | 5 | 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 | 469 | 488 | 506 | 585 | 635 | 693 | 695 | 100 | | Current_run | 502 | 508 | 540 | 584 | 623 | 657 | 680 | 100 | | Δ | 33 | 20 | 34 | -1 | -12 | -36 | -15 | 0 | | Improvement % | -7 | -4 | -7 | 0 | 2 | 5 | 2 | 0 |

github-actions[bot] commented 4 months ago

Code Metrics Report

main (6387067) #83 (40315fa) +/-
Coverage 85.1% 85.1% -0.1%
Details ``` diff | | main (6387067) | #83 (40315fa) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 85.1% | 85.1% | -0.1% | | Files | 9 | 9 | 0 | | Lines | 1608 | 1607 | -1 | - | Covered | 1369 | 1368 | -1 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 100.0% 0.0%
Sources/Str/Str.swift 33.3% +33.3%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 97.7% -0.1%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 82.3% 0.0%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (b919988) #83 (734fa3f) +/-
Coverage 85.1% 85.1% -0.1%
Details ``` diff | | main (b919988) | #83 (734fa3f) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 85.1% | 85.1% | -0.1% | | Files | 9 | 9 | 0 | | Lines | 1612 | 1611 | -1 | - | Covered | 1373 | 1372 | -1 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 100.0% 0.0%
Sources/Str/Str.swift 53.8% +53.8%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 97.7% -0.1%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 82.3% 0.0%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (0ebe7ec) #83 (751ce5e) +/-
Coverage 85.1% 81.9% -3.3%
Details ``` diff | | main (0ebe7ec) | #83 (751ce5e) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 85.1% | 81.9% | -3.3% | | Files | 9 | 9 | 0 | | Lines | 1613 | 1622 | +9 | - | Covered | 1374 | 1329 | -45 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 0.0% -100.0%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 87.7% -10.4%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 82.2% -0.5%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (70a1ceb) #83 (e055b4b) +/-
Coverage 85.2% 82.3% -3.0%
Details ``` diff | | main (70a1ceb) | #83 (e055b4b) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 85.2% | 82.3% | -3.0% | | Files | 9 | 9 | 0 | | Lines | 1605 | 1614 | +9 | - | Covered | 1369 | 1329 | -40 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 0.0% -100.0%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 87.7% -10.4%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 82.8% -0.1%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (ae16df2) #83 (61664fb) +/-
Coverage 85.7% 85.6% -0.1%
Details ``` diff | | main (ae16df2) | #83 (61664fb) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 85.7% | 85.6% | -0.1% | | Files | 9 | 9 | 0 | | Lines | 1603 | 1608 | +5 | + | Covered | 1374 | 1377 | +3 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 100.0% 0.0%
Sources/Str/Str.swift 46.1% +46.1%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 98.1% +0.0%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 83.2% -0.2%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov

kkebo commented 3 months 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 | 14 | 14 | 14 | 14 | 14 | 14 | 15 | 100 | | Δ | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | | Improvement % | 0 | 0 | 0 | 0 | 0 | 7 | 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 | 1547 | 1553 | 1558 | 1561 | 1566 | 1624 | 1681 | 100 | | Current_run | 1545 | 1596 | 1606 | 1614 | 1624 | 1691 | 1697 | 100 | | Δ | -2 | 43 | 48 | 53 | 58 | 67 | 16 | 0 | | Improvement % | 0 | -3 | -3 | -3 | -4 | -4 | -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 | 44 | 44 | 44 | 44 | 45 | 47 | 47 | 100 | | Current_run | 43 | 43 | 43 | 43 | 43 | 46 | 46 | 100 | | Δ | -1 | -1 | -1 | -1 | -2 | -1 | -1 | 0 | | Improvement % | 2 | 2 | 2 | 2 | 4 | 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 | 4581 | 4588 | 4649 | 4755 | 4919 | 4932 | 4933 | 100 | | Current_run | 4625 | 4637 | 4645 | 4796 | 4805 | 4813 | 4818 | 100 | | Δ | 44 | 49 | -4 | 41 | -114 | -119 | -115 | 0 | | Improvement % | -1 | -1 | 0 | -1 | 2 | 2 | 2 | 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 | 20 | 20 | 20 | 20 | 21 | 22 | 22 | 100 | | Current_run | 19 | 19 | 19 | 19 | 20 | 21 | 21 | 100 | | Δ | -1 | -1 | -1 | -1 | -1 | -1 | -1 | 0 | | Improvement % | 5 | 5 | 5 | 5 | 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 | 463 | 468 | 483 | 487 | 924 | 928 | 931 | 100 | | Current_run | 454 | 460 | 489 | 529 | 570 | 618 | 619 | 100 | | Δ | -9 | -8 | 6 | 42 | -354 | -310 | -312 | 0 | | Improvement % | 2 | 2 | -1 | -9 | 38 | 33 | 34 | 0 |

github-actions[bot] commented 3 months ago

Code Metrics Report

main (ae16df2) #83 (38319cc) +/-
Coverage 85.7% 85.4% -0.3%
Details ``` diff | | main (ae16df2) | #83 (38319cc) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 85.7% | 85.4% | -0.3% | | Files | 9 | 9 | 0 | | Lines | 1603 | 1603 | 0 | - | Covered | 1374 | 1370 | -4 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 100.0% 0.0%
Sources/Str/Str.swift 46.1% +46.1%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 98.1% +0.0%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 83.0% -0.4%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (ae16df2) #83 (ced82f1) +/-
Coverage 85.7% 85.4% -0.3%
Details ``` diff | | main (ae16df2) | #83 (ced82f1) | +/- | |-----------|----------------|---------------|-------| - | Coverage | 85.7% | 85.4% | -0.3% | | Files | 9 | 9 | 0 | | Lines | 1603 | 1583 | -20 | - | Covered | 1374 | 1353 | -21 | ```

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

Files Coverage +/-
Sources/HTMLEntities/namedChars.swift 100.0% 0.0%
Sources/Str/Str.swift 46.1% +46.1%
Sources/Tokenizer/BufferQueue.swift 100.0% 0.0%
Sources/Tokenizer/CharRefTokenizer.swift 98.1% +0.0%
Sources/Tokenizer/DOCTYPE.swift 100.0% 0.0%
Sources/Tokenizer/SmallCharSet.swift 100.0% 0.0%
Sources/Tokenizer/Tag.swift 100.0% 0.0%
Sources/Tokenizer/Tokenizer.swift 83.2% -0.2%
Sources/Tokenizer/Utils.swift 100.0% 0.0%

Reported by octocov