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

feat: Procedural overhaul #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JonathanWoollett-Light
Copy link
Contributor

@JonathanWoollett-Light JonathanWoollett-Light commented Apr 20, 2023

Overhauls the event manager to offer a simpler and more procedural interface (which is also more performant).

Benchmarks

The benchmarks cannot be re-created exactly but I've tried to make them as close as possible.

These illustrate a significant performance improvement in all but one benchmark where there is a small performance degredation.

process_basic           time:   [9.0058 µs 9.0125 µs 9.0212 µs]
                        change: [-33.323% -33.247% -33.170%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 28 outliers among 200 measurements (14.00%)
  6 (3.00%) high mild
  22 (11.00%) high severe

process_with_arc_mutex  time:   [11.243 µs 11.245 µs 11.248 µs]
                        change: [-15.655% -15.559% -15.479%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 21 outliers among 200 measurements (10.50%)
  6 (3.00%) high mild
  15 (7.50%) high severe

process_with_inner_mut  time:   [9.6837 µs 9.6857 µs 9.6878 µs]
                        change: [-24.836% -24.778% -24.735%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 20 outliers among 200 measurements (10.00%)
  8 (4.00%) high mild
  12 (6.00%) high severe

process_dynamic_dispatch
                        time:   [19.187 µs 19.192 µs 19.198 µs]
                        change: [+3.4918% +3.5866% +3.6852%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 23 outliers among 200 measurements (11.50%)
  8 (4.00%) high mild
  15 (7.50%) high severe

process_dispatch_few_events
                        time:   [506.93 ns 507.06 ns 507.23 ns]
                        change: [-27.610% -27.536% -27.456%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 21 outliers among 200 measurements (10.50%)
  8 (4.00%) high mild
  13 (6.50%) high severe

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR are signed (with git commit -s), and the commit
    message has max 60 characters for the summary and max 75 characters for each
    description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

Signed-off-by: Jonathan Woollett-Light <[email protected]>
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