Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

Memory allocation overhead varies depending on platform #1

Open
@kabergstrom

Description

@kabergstrom

When running the benchmarks, I got more than an 80% improvement (10ms to 2ms) when I switched from platform-provided malloc to rpmalloc on windows for the serialize_binary benchmark. Additionally, after switching, some other cases had up to 36% difference in runtime. I think a good avenue to explore for extending the benches would be to measure # and size of allocations for the test cases, and to warn people about platform-provided malloc. Maybe you should mandate a custom allocator that is cross-platform to avoid people benchmarking the wrong thing.

Additionally, I would advise pre-allocating serialization buffers to ensure it's not just a bench of Vec::grow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions