Skip to content

perf(napi/parser): raw transfer: reduce size of buffer by 16 bytes#12277

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-14-perf_napi_parser_raw_transfer_reduce_size_of_buffer_by_16_bytes
Jul 14, 2025
Merged

perf(napi/parser): raw transfer: reduce size of buffer by 16 bytes#12277
graphite-app[bot] merged 1 commit intomainfrom
07-14-perf_napi_parser_raw_transfer_reduce_size_of_buffer_by_16_bytes

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 14, 2025

Reduce the size of the buffer used for raw transfer by 16 bytes so that there's 16 bytes space for malloc's metadata without committing another memory page. I don't know for sure that malloc would store metadata in the allocation for allocations this large, but this is what Bumpalo does, so it's probably a good idea.

@github-actions github-actions bot added A-ast-tools Area - AST tools C-performance Category - Solution not expected to change functional behavior, only performance labels Jul 14, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 14, 2025

CodSpeed Instrumentation Performance Report

Merging #12277 will not alter performance

Comparing 07-14-perf_napi_parser_raw_transfer_reduce_size_of_buffer_by_16_bytes (cc1e9fc) with main (5fba91c)

Summary

✅ 34 untouched benchmarks

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jul 14, 2025
Copy link
Member Author

overlookmotel commented Jul 14, 2025

Merge activity

…12277)

Reduce the size of the buffer used for raw transfer by 16 bytes so that there's 16 bytes space for `malloc`'s metadata without committing another memory page. I don't know for sure that `malloc` would store metadata in the allocation for allocations this large, but this is what Bumpalo does, so it's probably a good idea.
@graphite-app graphite-app bot force-pushed the 07-14-perf_napi_parser_raw_transfer_reduce_size_of_buffer_by_16_bytes branch from 723617a to cc1e9fc Compare July 14, 2025 20:46
@graphite-app graphite-app bot merged commit cc1e9fc into main Jul 14, 2025
25 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 14, 2025
@graphite-app graphite-app bot deleted the 07-14-perf_napi_parser_raw_transfer_reduce_size_of_buffer_by_16_bytes branch July 14, 2025 20:54
graphite-app bot pushed a commit that referenced this pull request Jul 15, 2025
Fix a bug with calculating pointer to start of `Allocator` which crept in when buffer size changed in #12277.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast-tools Area - AST tools C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant