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

[WIP] experiment with parallelization #41

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

waltzofpearls
Copy link
Owner

No description provided.

@waltzofpearls waltzofpearls force-pushed the update-dependencies branch 2 times, most recently from 10e923b to 978a50b Compare November 13, 2023 01:46
Base automatically changed from update-dependencies to main November 13, 2023 01:51
@jqnatividad
Copy link

Hi @waltzofpearls , was just wondering if you have any preliminary findings in terms of performance?

@waltzofpearls
Copy link
Owner Author

Hey @jqnatividad, I ran benchmark against both approaches, the old one with sequential matches, and the new one with parallel matches. Surprisingly the parallel matches was overall slower, and not just slightly slower. I think there are cost in scheduling and synchronizing parallel works. Maybe I didn't find the right tool for the problem I want to solve.

The old approach is easy and much like brute force, and that leads to much faster time in a better scenario, and relatively slower in a worse case scenario. If someone is using a format that has "lower priority" in the list, they will get slower parsing speed. Still, we are only talking about nanoseconds to microseconds level speed comparison for each parsing operation.

I think overall, more experiment is needed if I want to keep going with the parallelization work. Another approach is completely rewrite the parsing, so it will parse character by character instead of making assumptions with regular expressions.

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