| ▲ | pythomancer 12 hours ago | |||||||||||||
(author here) check_brackets_bt is actually exactly the algorithm that Raph mentions | ||||||||||||||
| ▲ | raphlinus 11 hours ago | parent | next [-] | |||||||||||||
Right. This is the binary tree version of the algorithm, and is nice and concise, very readable. What would take it to the next level for me is the version in the stack monoid paper, which chunks things up into workgroups. I haven't done benchmarks against the Pareas version (unfortunately it's not that easy), but I would expect the workgroup optimized version to be quite a bit faster. | ||||||||||||||
| ||||||||||||||
| ▲ | Munksgaard 12 hours ago | parent | prev [-] | |||||||||||||
Thanks for clarifying! It would indeed be interesting to see a comparison between similar implementations in other languages, both in terms of readability and performance. I feel like the readability can hardly get much better than what you wrote, but I don't know! | ||||||||||||||