Skip to content

Roadmap 1.4.0 — earn the benchmark #103

Description

@EONRaider

Tier 1 of the post-1.3.0 roadmap. Target version: 1.4.0 (minor).

Every item here is internal. The public API does not move, which is why
this is a minor and not a major.

#ItemMeasured gain
#82Hoist protocol dispatch into module-level tables91× / 42× on dispatch
#83Render MAC addresses with bytes.hex(":")16.5× on the call
#84Stop re-validating addresses the decoder just generated2.3 µs/frame
#85Cache DNS section parsing instead of re-serializing14 re-serializations → 1
#86Add a reproducible benchmark harness and CI regression gate

The point of this tier

Measured on the 97-frame corpus (CPython 3.12, one machine):

frames/sec
scapy 2.7.017,100
NETProtocols 1.3.036,500
NETProtocols with #82#84 applied89,200
dpkt 1.9.8104,000

We are 2.1× faster than scapy and 2.9× slower than dpkt today.
After this tier: ~86% of dpkt and 5.2× scapy. A patched scratch copy
proving the 2.4× end-to-end figure passes all 698 tests unmodified.

Sequencing

#82 and #83 are independent and can land in either order. #84 should
follow them
— regex validation only becomes the top remaining cost
once dispatch and MAC rendering are fixed, and measuring it before then
understates it. #85 is independent of all three. #86 closes the tier
and gates any performance claim reaching the README
(see #101).

Do not publish numbers before this tier closes

The previous strategy note recommended publishing a benchmark table
immediately. Doing that today would put "2.9× slower than dpkt" in our
own README. Order matters: do the work, then make the claim.

Part of the post-1.3.0 roadmap: #107

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestroadmapPost-1.0 roadmap

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions