ojhunt wrote:

Rather than per site branches, it might be better to just remove the table 
lookup if we can. I recognize that there might well be other characters that 
set these flags for historical reasons, but I'd be interested in see the ideal 
perf of something like this:

```cpp
bool isHorizontalWhitespace(char Ch) {
  return Ch == ' ' || Ch == '\t' || Ch == '\f' || Ch == '\v';
}
```

It should compile down to something pretty much branchless on most modern 
targets

https://github.com/llvm/llvm-project/pull/180819
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to