Skip to content

[libc++] Performance differences between libc++ and libstdc++ in cpu2017 xalan benchmark #168173

@shivaramaarao

Description

@shivaramaarao

When trying to use libc++ with cpu2017 xalan benchmark, seeing following performance issue

machine: amd znver5

compiler used: llvm 21
options used: -O3 -march=znver5 -flto

single copy runtime with libc++ : 143

single copy runtime with libstdc++ : 131

There seem to be 9% difference

perf report shows that more time is spent in std::find function. when libstdc++ is used, the function is vectorized and a scalar variant is used with libc++.

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions