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

Reduce GC pressure and virtual function overhead. Micro-bench shows 70% cpu time reduction. #1

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

Conversation

ignatz
Copy link

@ignatz ignatz commented Sep 6, 2023

This change is functionally a no-op.

…time reductions (and 30% peak memory reduction).

Some more minor cleanups w/o changing the algorithm. Also add a makeshift benchmark.

Preliminary benchmark results (running in binary mode):

    $ dart compile exe test/polylabel_test.dart
    $ /usr/bin/time test/polylabel_test.exe

Before:

    Elapsed time for 1000 iterations of water1: 0:03:07.518190
    ...
    187.63user 0.36system 3:07.73elapsed 100%CPU (0avgtext+0avgdata 49792maxresident)k
    0inputs+0outputs (0major+11294minor)pagefaults 0swaps

After:

    Elapsed time for 1000 iterations of water1: 0:00:54.449161
    ...
    54.52user 0.19system 0:54.52elapsed 100%CPU (0avgtext+0avgdata 33344maxresident)k
    0inputs+0outputs (0major+7155minor)pagefaults 0swaps

Also, bump version number since this is an API incompatible change.
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