Skip to content

perf(clp-s::timestamp_parser): Improve marshalling speed for format specifiers representing padded integer fields. #1968

@gibber9809

Description

@gibber9809

Request

Currently clp_s::timestamp_parser is slower at marshalling certain kinds of timestamp formats than the older clp_s::TimestampPattern, which can lead to slower overall decompression speeds as shown in #1788.

After some profiling, this slowdown seems to mostly come from calls to fmt::format for marshalling zero and space-padded integer fields (judging by the profiling results, most of the time is spent dynamically parsing format strings).

Possible implementation

Replace all or the majority of the fmt::format calls in the marshalling path for clp_s::timestamp_parser with calls to an optimized function which appends padded integers to a buffer, similar to what we do in the old clp_s::TimestampPattern marshalling code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions