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

Prefix-tree router #44

Merged
merged 15 commits into from
Nov 11, 2017
Merged

Prefix-tree router #44

merged 15 commits into from
Nov 11, 2017

Conversation

ikitommi
Copy link
Member

@ikitommi ikitommi commented Nov 8, 2017

Background

Based on Pedestal

But rewritten for speed and (IMO) correctness.

Speed?

4x better perf than the :linear-router (or the pedestal prefix-tree router) on the opensensor routing test.

Here are the steps for perf improvement:

  ;; 3.1ms
  ;; 2.5ms (string equals)
  ;; 2.5ms (protocol)
  ;; 2.3ms (nil childs)
  ;; 2.0ms (rando impros)
  ;; 1.9ms (wild & catch shortcuts)
  ;; 1.5ms (inline child fetching)
  ;; 1.5ms (WildNode also backtracks)
  ;; 1.4ms (precalculate segment-size)
  ;; 1.3ms (fast-map)
  ;; 1.3ms (dissoc wild & catch-all from children)
  ;; 1.3ms (reified protocols)
  ;; 0.8ms (flattened matching)
  ;; 0.8ms (return route-data)
  ;; 0.8ms (fix payloads)

screen shot 2017-11-08 at 9 13 47

Should this be merged?

Not yet, need more tests.

This was referenced Nov 8, 2017
@ikitommi ikitommi merged commit 95b796e into master Nov 11, 2017
@ikitommi ikitommi mentioned this pull request Nov 11, 2017
@miikka miikka deleted the trie branch July 28, 2020 10:52
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.

None yet

1 participant