I noticed that the comments pass often doesn't work because of some edge cases where it tries to remove non-comments (e.g. strings with urls, or // ...*/... ). So I added an extra binary search pass that removes just c++ style comments.
Removing cstyle comments seems a bit more tricky, so I didn't consider them here. It's might also contribute less to improving runtime, since they don't break up lines in topformflat like the c++ style comments do.
I noticed that the comments pass often doesn't work because of some edge cases where it tries to remove non-comments (e.g. strings with urls, or // ...*/... ). So I added an extra binary search pass that removes just c++ style comments.
Removing cstyle comments seems a bit more tricky, so I didn't consider them here. It's might also contribute less to improving runtime, since they don't break up lines in topformflat like the c++ style comments do.