Improve `Literal` path matching via state machine
Matching on path literals is currently done by set operations on a set of strings.
The idea would be to improve this, by creating a state machine, that transitions to the next state based on the chars of all the possible alternative path segments.
For example, if we have two segments on the same level aa and ab, we can only proceed if the first char is an a, the second a or b.
Also we might be able to make a check based on the input length and fast exist if non of the possible segments has the same length.
This requires benchmarking first. So we can compare the current to the state machine version.
/bounty $1250 for benchmarks and compilation to super fast state machines. Benchmarks should prove superior performance and happy path should be zero allocation, or as close as is theoretically possible.
đ $1,250 bounty âĸ ZIO
Steps to solve:
- Start working: Comment
/attempt #2960with your implementation plan - Submit work: Create a pull request including
/claim #2960in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
Thank you for contributing to zio/zio-http!
Add a bounty âĸ Share on socials
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| đ´ @987Nabil | Jul 30, 2024, 3:31:17 PM | #3277 |
| đ´ @hoklims | Nov 23, 2024, 9:33:25 AM | WIP |
| đ´ @promisingcoder | Dec 12, 2024, 2:46:45 AM | WIP |
/attempt #2960
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @987Nabil | Â Â Â 56 ZIO bounties + 1 bounty from 1 project |
Scala |
īš1522 |
Cancel attempt |
@987Nabil: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then đ
The bounty is up for grabs! Everyone is welcome to /attempt #2960 đ
hey @987Nabil you working on these, i would like to do this ??
Yes, i am
@hoklims: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then đ
The bounty is up for grabs! Everyone is welcome to /attempt #2960 đ
@jdegoes @987Nabil please review my pull request
@vigoo
Please do not attempt this issue anymore. I already came to a conclusion and I have JMH benchmarks implemented and some fixes that are unrelated to the issue but will make the routing faster. We are not able to use state machines. I leave this issue open until this changes are merged.
@promisingcoder: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then đ
The bounty is up for grabs! Everyone is welcome to /attempt #2960 đ
đĄ @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.