Skip to content

Conversation

@lhecker
Copy link
Member

@lhecker lhecker commented Jan 20, 2026

The main change is adding multithreading support in order to make JSON
unit tests work properly. The TLS overhead is not _that bad.

Other changes:

  • Switch to io::Result, because AllocError doesn't
    transmit error codes (meh!)
  • Reduce x86 commit chunk size to 32KiB
  • Improved performance slightly by inlining harder (alloc_uninit)
    and outlining the result unwrap (alloc_raw_bump)

@lhecker lhecker requested a review from johnturek January 20, 2026 18:25
@lhecker lhecker mentioned this pull request Jan 20, 2026
@lhecker lhecker force-pushed the dev/lhecker/multithreaded-arena branch from 4ba2439 to 01c0279 Compare January 20, 2026 18:31
@lhecker lhecker force-pushed the dev/lhecker/multithreaded-arena branch from 01c0279 to 1d1b190 Compare January 20, 2026 18:33
/// This function is unsafe because it uses raw pointers.
/// Make sure to only pass pointers acquired from [`virtual_reserve`]
/// and to pass a size less than or equal to the size passed to [`virtual_reserve`].
pub unsafe fn virtual_commit(base: NonNull<u8>, size: usize) -> Result<(), AllocError> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update unix too?

@lhecker lhecker enabled auto-merge (squash) January 20, 2026 21:06
@lhecker lhecker merged commit 8d9b1ed into main Jan 20, 2026
6 checks passed
@lhecker lhecker deleted the dev/lhecker/multithreaded-arena branch January 20, 2026 21:11
lhecker added a commit that referenced this pull request Jan 20, 2026
This is a bog-standard JSONC parser. Not much to be said.
Its performance is quite alright.

Depends on #741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants