Skip to content

[llvm-debuginfo-analyzer] Optimize 'LVNamespaceDeduction::find' funtion. #69174

Open
@CarlosAlbertoEnciso

Description

@CarlosAlbertoEnciso

Extracted from llvm/tools/llvm-debuginfo-analyzer/README.txt
https://reviews.llvm.org/D125784#inline-1296195

Optimize the 'find' method to use the proposed code:

  LVStringRefs::iterator Iter = std::find_if(Components.begin(), Components.end(),
    [](StringRef Name) {
        return IdentifiedNamespaces.find(Name) == IdentifiedNamespaces.end();
    });
  LVStringRefs::size_type FirstNonNamespace = std::distance(Components.begin(), Iter);

Activity

llvmbot

llvmbot commented on Oct 16, 2023

@llvmbot
Member

@llvm/issue-subscribers-debuginfo

Author: Carlos Alberto Enciso (CarlosAlbertoEnciso)

Extracted from [llvm/tools/llvm-debuginfo-analyzer/README.txt](https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-debuginfo-analyzer/README.txt) https://reviews.llvm.org/D125784#inline-1296195

Optimize the 'find' method to use the proposed code:

  LVStringRefs::iterator Iter = std::find_if(Components.begin(), Components.end(),
    [](StringRef Name) {
        return IdentifiedNamespaces.find(Name) == IdentifiedNamespaces.end();
    });
  LVStringRefs::size_type FirstNonNamespace = std::distance(Components.begin(), Iter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @EugeneZelenko@CarlosAlbertoEnciso@llvmbot

        Issue actions

          [llvm-debuginfo-analyzer] Optimize 'LVNamespaceDeduction::find' funtion. · Issue #69174 · llvm/llvm-project