diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-02-03 10:49:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 10:49:05 -0800 |
commit | 4e8b85a8d3953234bbfa490cb1d4f5c32380fb3f (patch) | |
tree | ae6f5b3ff3578cfb5614eac05c031e98b54d5070 /src/parsing.h | |
parent | abc1df9fa0b36cc5cd5aa473c3809cd39cebc653 (diff) | |
download | binaryen-4e8b85a8d3953234bbfa490cb1d4f5c32380fb3f.tar.gz binaryen-4e8b85a8d3953234bbfa490cb1d4f5c32380fb3f.tar.bz2 binaryen-4e8b85a8d3953234bbfa490cb1d4f5c32380fb3f.zip |
[NFC] Simplify TopologicalSortStack (#4498)
Using a vector and lazily skipping finished items in `pop` rather than using a
linked list and eagerly removing duplicated items makes the code simpler and
more than twice as fast on my test case. The algorithmic complexity is unchanged
because the work to skip duplicates remains linear in the number of duplicates
added, it's just not spread out over the linear duplicate pushes any more.
Diffstat (limited to 'src/parsing.h')
0 files changed, 0 insertions, 0 deletions