Skip to content

Conversation

unlessgames
Copy link
Collaborator

Implementing #57

Copy link

Benchmark for 8fa6412

Click to view benchmark
Test Base PR %
Cycle/Generate 48.7±0.40µs 52.4±0.57µs +7.60%
Cycle/Parse 368.9±6.24µs 364.1±4.95µs -1.30%
Rust Phrase/Clone 442.5±3.65ns 443.5±5.71ns +0.23%
Rust Phrase/Create 75.0±0.86µs 74.1±0.92µs -1.20%
Rust Phrase/Run 646.7±5.36µs 650.7±5.45µs +0.62%
Rust Phrase/Seek 151.6±272.22µs 147.4±277.38µs -2.77%
Scripted Phrase/Clone 627.8±10.02ns 624.6±7.79ns -0.51%
Scripted Phrase/Create 950.6±10.72µs 957.7±19.39µs +0.75%
Scripted Phrase/Run 1669.5±9.46µs 1676.2±24.08µs +0.40%
Scripted Phrase/Seek 220.4±444.39µs 215.2±434.21µs -2.36%

@emuell
Copy link
Member

emuell commented Apr 14, 2025

I guess it would be possible to only disallow sequences of ___ as name in the parser? So we could also support using "_some_name" as target, but that's likely not worth the extra parsing overhead and complication in the grammar.

@emuell emuell merged commit 84dbc2e into master Apr 14, 2025
2 checks passed
@emuell emuell deleted the cycle-multiholds branch April 14, 2025 20:51
@unlessgames
Copy link
Collaborator Author

we could also support using "_some_name" as target

We could try and see how much slower it got but I didn't think it worth the trouble. Also, it might be better to error instead of going with a target silently when the user is really meant to write some _ another and not some _another, not sure how often you'd want to start targets with underscore in general anyway.

@emuell
Copy link
Member

emuell commented Apr 17, 2025

Yep. It's good enough as it is now.

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.

2 participants