Smattr / clink

a modern re-implementation of Cscope
The Unlicense
41 stars 2 forks source link

disallow \r and \n in comment delimiters #174

Closed Smattr closed 1 year ago

Smattr commented 1 year ago

When using Cscope-based parsing, eat_if shows up as 2.90% of execution time, not including its callers. By banning newline characters from comment starters and enders, we can omit the trailer of eat_if. This is a reduction of 4.16% in instructions executed and 1.72% in execution time.

It is surprising that eat_if seems to get neither inlined or specialised despite looking like a perfect candidate for this.