(author here) check_brackets_bt is actually exactly the algorithm that Raph mentions
But you're right, it would be interesting to see how the different approaches stack up to each other. The Pareas project linked above also includes an implementation using radix sort.