[all-commits] [llvm/llvm-project] 60b4b3: [clangd] Avoid lexicographic compare when sorting ...

Sam McCall via All-commits all-commits at lists.llvm.org
Wed Oct 5 14:02:47 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 60b4b39f5a78661e2b9d222cf6ba7d9d5d7511ed
      https://github.com/llvm/llvm-project/commit/60b4b39f5a78661e2b9d222cf6ba7d9d5d7511ed
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-10-05 (Wed, 05 Oct 2022)

  Changed paths:
    M clang-tools-extra/clangd/index/SymbolID.h

  Log Message:
  -----------
  [clangd] Avoid lexicographic compare when sorting SymbolIDs. NFC

These are 8 bytes and we don't care about the actual ordering, so use
integer compare.

The array generated code has some extra byte swaps (clang), calls memcmp (gcc)
or inlines a big chain of comparisons (MSVC): https://godbolt.org/z/e79r6jM6K




More information about the All-commits mailing list