8000 Use a stack-based vec type instead of String in building the VLQ encoded bits · Issue #1 · mtolmacs/wasm2map · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Use a stack-based vec type instead of String in building the VLQ encoded bits #1
Open
@mtolmacs

Description

@mtolmacs

Background

There is a tight loop within WASM::generate where mappings are built and VQL encoded, which currently uses String. However String is heap allocated, which means a ton of small allocations. Since there is a practical limit of how long the mappings usually are, we can use a stack-based vec type (arrayvec, tinyvec, smallvec or the like) to avoid these allocations completely.

Success

Expected at least 50% mapping speedup based on previous experiments with heap vs stack allocated vec types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0