Skip to content

[WIP] experiment with parallelization#41

Draft
waltzofpearls wants to merge 2 commits intomainfrom
experiment-with-parallelization
Draft

[WIP] experiment with parallelization#41
waltzofpearls wants to merge 2 commits intomainfrom
experiment-with-parallelization

Conversation

@waltzofpearls
Copy link
Copy Markdown
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
Copy Markdown

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

@waltzofpearls
Copy link
Copy Markdown
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