[PATCH] D50839: [llvm] Make YAML serialization up to 2.5 times faster
Kirill Bobyrev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 21 00:25:54 PDT 2018
kbobyrev marked an inline comment as done.
kbobyrev added a comment.
Fixed the assertion in https://reviews.llvm.org/rL340252. My comments about `compare_lower()` are inline.
================
Comment at: llvm/trunk/include/llvm/Support/YAMLTraits.h:464
- static const char HexChars[] = "0123456789abcdefABCDEF";
- if (S.startswith("0x") &&
- S.drop_front(2).find_first_not_of(HexChars) == StringRef::npos)
+ if (S.equals(".nan") || S.equals(".NaN") || S.equals(".NAN"))
return true;
----------------
andreadb wrote:
> You can probably use `StringRef::compare_lower()` rather than enumerating all the possible strings in input.
`.nAN`, `.Nan` will be allowed then, same with infinity.
Repository:
rL LLVM
https://reviews.llvm.org/D50839
More information about the llvm-commits
mailing list