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

perf: optimize trie construction #448

Merged
merged 1 commit into from
Sep 7, 2024
Merged

perf: optimize trie construction #448

merged 1 commit into from
Sep 7, 2024

Conversation

nolanlawson
Copy link
Owner

Optimize the trie function which is used heavily when setting customEmoji.

Copy link

github-actions bot commented Sep 7, 2024

📊 Tachometer Benchmark Results

Summary

benchmark-total

  • emoji-picker-element-change-tab: unsure 🔍 -5% - +3% (-1.56ms - +1.03ms)
    this-change vs tip-of-tree
  • emoji-picker-element-database-interactions: unsure 🔍 -5% - +3% (-5.85ms - +3.33ms)
    this-change vs tip-of-tree
  • emoji-picker-element-first-load: unsure 🔍 -6% - +5% (-3.01ms - +2.41ms)
    this-change vs tip-of-tree
  • emoji-picker-element-many-custom-emoji: unsure 🔍 -2% - +1% (-4.62ms - +1.98ms)
    this-change vs tip-of-tree
  • emoji-picker-element-second-load: unsure 🔍 -6% - +1% (-2.61ms - +0.31ms)
    this-change vs tip-of-tree

Results

emoji-picker-element-change-tab
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
33.11ms - 35.02ms-unsure 🔍
-5% - +3%
-1.56ms - +1.03ms
tip-of-tree
tip-of-tree
33.45ms - 35.20msunsure 🔍
-3% - +5%
-1.03ms - +1.56ms
-
emoji-picker-element-database-interactions
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
105.09ms - 111.30ms-unsure 🔍
-5% - +3%
-5.85ms - +3.33ms
tip-of-tree
tip-of-tree
106.07ms - 112.84msunsure 🔍
-3% - +5%
-3.33ms - +5.85ms
-
emoji-picker-element-first-load
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
49.80ms - 53.41ms-unsure 🔍
-6% - +5%
-3.01ms - +2.41ms
tip-of-tree
tip-of-tree
49.89ms - 53.92msunsure 🔍
-5% - +6%
-2.41ms - +3.01ms
-
emoji-picker-element-many-custom-emoji
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
222.44ms - 226.24ms-unsure 🔍
-2% - +1%
-4.62ms - +1.98ms
tip-of-tree
tip-of-tree
222.96ms - 228.36msunsure 🔍
-1% - +2%
-1.98ms - +4.62ms
-
emoji-picker-element-second-load
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
42.45ms - 44.22ms-unsure 🔍
-6% - +1%
-2.61ms - +0.31ms
tip-of-tree
tip-of-tree
43.32ms - 45.65msunsure 🔍
-1% - +6%
-0.31ms - +2.61ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented Sep 7, 2024

Size Change: +45 B (+0.12%)

Total Size: 36.8 kB

Filename Size Change
./bundle.js 36.8 kB +45 B (+0.12%)

compressed-size-action

@nolanlawson
Copy link
Owner Author


┌─────────────┬─────────────────┐                                                              
│     Browser │ chrome-headless │                                                              
│             │ 128.0.0.0       │                                                              
├─────────────┼─────────────────┤                                                              
│ Sample size │ 310             │                                                              
└─────────────┴─────────────────┘                                                              
                                                                                               
┌─────────────┬─────────────┬─────────────┬─────────────────────┬──────────────────┬──────────────────┐
│ Benchmark   │ Version     │ Bytes       │            Avg time │   vs this-change │   vs tip-of-tree │
│             │             │             │                     │                  │      tip-of-tree │
├─────────────┼─────────────┼─────────────┼─────────────────────┼──────────────────┼──────────────────┤
│ this-change │ <none>      │ 1027.26 KiB │ 290.67ms - 298.48ms │                  │           faster │
│             │             │             │                     │         -        │          1% - 5% │
│             │             │             │                     │                  │ 3.63ms - 14.69ms │
├─────────────┼─────────────┼─────────────┼─────────────────────┼──────────────────┼──────────────────┤
│ tip-of-tree │ tip-of-tree │ 1027.12 KiB │ 299.82ms - 307.65ms │           slower │                  │
│             │             │             │                     │          1% - 5% │         -        │
│             │             │             │                     │ 3.63ms - 14.69ms │                  │
└─────────────┴─────────────┴─────────────┴─────────────────────┴──────────────────┴──────────────────┘

┌─────────────┬──────────────────┐
│     Browser │ firefox-headless │
│             │ 130.0            │
├─────────────┼──────────────────┤
│ Sample size │ 720              │
└─────────────┴──────────────────┘

┌─────────────┬─────────────┬─────────────┬─────────────────────┬───────────────────┬───────────────────┐
│ Benchmark   │ Version     │ Bytes       │            Avg time │    vs this-change │    vs tip-of-tree │
│             │             │             │                     │                   │       tip-of-tree │
├─────────────┼─────────────┼─────────────┼─────────────────────┼───────────────────┼───────────────────┤
│ this-change │ <none>      │ 1071.07 KiB │ 391.83ms - 397.46ms │                   │            unsure │
│             │             │             │                     │          -        │         -1% - +1% │
│             │             │             │                     │                   │ -2.96ms - +4.53ms │
├─────────────┼─────────────┼─────────────┼─────────────────────┼───────────────────┼───────────────────┤
│ tip-of-tree │ tip-of-tree │ 1070.94 KiB │ 391.39ms - 396.32ms │            unsure │                   │
│             │             │             │                     │         -1% - +1% │          -        │
│             │             │             │                     │ -4.53ms - +2.96ms │                   │
└─────────────┴─────────────┴─────────────┴─────────────────────┴───────────────────┴───────────────────┘

@nolanlawson nolanlawson merged commit 9954aef into master Sep 7, 2024
3 checks passed
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