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

Remove regex crate and do manual parsing #32

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

Conversation

oblique
Copy link

@oblique oblique commented Oct 11, 2021

This reduces the binary size from 1.4mb to 264kb.

Fixes #31

@oblique
Copy link
Author

oblique commented Oct 11, 2021

Parsing also includes some of the flexibility that regex crate introduced.

This reduces the binary size from 1.4mb to 264kb.

Fixes abaumhauer#31
@chrismooredev
Copy link

I'd like to add that this patch improves the runtime of one of my benchmarks by 10x

My use case is parsing MAC addresses through a SQLite3 custom extension. The regex-based version, latest on crates.io, takes ~11s to process 92428 MAC address records (runtime provided is combined of 4 runs through a dirty benchmark script in python), while this patch takes ~1s.

Running perf shows that regex dwarfs the runtime of pretty much every other function. I've attached some screenshots from perf report, of runs of the latest crate vs a monkeypatch of this PR.

pre-patch

post-patch

@oblique
Copy link
Author

oblique commented Dec 24, 2022

@chrismooredev It looks like this crate is abandoned

@fastfailures
Copy link

@chrismooredev It looks like this crate is abandoned

I moved to using advmac crate

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.

Big binary size
3 participants