Skip to content

Poor performance with hashing large constant strings #58860

Open
@clubby789

Description

@clubby789

Found as part of rust-lang/rust#103812.

When creating a very large constant blob, a large proportion of compile time is spent hashing the string with djbHash to insert it into CDSConstants

auto &Slot =
*Ty->getContext()
.pImpl->CDSConstants.insert(std::make_pair(Elements, nullptr))
.first;

@alloc = private unnamed_addr constant <{ [104857600 x i8] }> <{ [104857600 x i8] c"... VERY LONG DATA ..." }>, align 1

cc @pcwalton

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions