[PATCH] D50839: [llvm] Make YAML serialization up to 2.5 times faster

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 02:49:45 PDT 2018


Right.
I was mainly concerned about the assert. Thanks for fixing it! :-)

On Tue, Aug 21, 2018 at 8:25 AM, Kirill Bobyrev via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180821/13190bd2/attachment.html>


More information about the llvm-commits mailing list