Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace String with Str #83

Merged
merged 4 commits into from
Aug 12, 2024
Merged

refactor: replace String with Str #83

merged 4 commits into from
Aug 12, 2024

Conversation

kkebo
Copy link
Owner

@kkebo kkebo commented May 28, 2024

No description provided.

@kkebo kkebo self-assigned this May 28, 2024
@kkebo kkebo force-pushed the replace-string-with-str-2 branch from 9ca0165 to b891fec Compare June 2, 2024 15:49
@kkebo kkebo marked this pull request as draft June 2, 2024 15:59
@kkebo kkebo marked this pull request as ready for review June 2, 2024 16:20

This comment has been minimized.

@kkebo
Copy link
Owner Author

kkebo commented Jun 2, 2024

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

@kkebo kkebo force-pushed the replace-string-with-str-2 branch from 195110b to 31dd5b2 Compare June 30, 2024 16:51

This comment has been minimized.

@kkebo kkebo force-pushed the replace-string-with-str-2 branch from 31dd5b2 to f069de5 Compare July 1, 2024 15:04

This comment has been minimized.

@kkebo kkebo force-pushed the replace-string-with-str-2 branch from f069de5 to 3a2565f Compare July 28, 2024 11:39

This comment has been minimized.

@kkebo kkebo force-pushed the replace-string-with-str-2 branch from 3a2565f to dc46a79 Compare July 28, 2024 15:31

This comment has been minimized.

This comment has been minimized.

@kkebo
Copy link
Owner Author

kkebo commented Aug 12, 2024

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

This comment has been minimized.

Copy link
Contributor

Code Metrics Report

main (ae16df2) #83 (ced82f1) +/-
Coverage 85.7% 85.4% -0.3%
Details
  |           | 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

@kkebo kkebo merged commit fcdbfa1 into main Aug 12, 2024
2 checks passed
@kkebo kkebo deleted the replace-string-with-str-2 branch August 12, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant