Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(sourcemap): use simd to escape JSON string #4487

Merged

Commits on Jul 29, 2024

  1. perf(sourcemap): use simd to escape JSON string (#4487)

    Also optimize the memory allocation in string escape. The default size in `serde_json` is 1024 for String type, we pre allocate `string.len() * 2 + 2` for every string to reduce re-allocate in escaping.
    
    I've tried to hand write SIMD implementation, but it's too complex, so I uses the `v_jsonescape` here. But it doesn't support `aarch64` and `wasm32` simd implementation, we need to contribute to it!
    Brooooooklyn committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    1fd9dd0 View commit details
    Browse the repository at this point in the history