Optimize Ona Heap Deallocation in Safety-Checked Builds #18

Closed
opened 2023-06-04 16:44:25 +02:00 by kayomn · 1 comment
Owner

Deallocations perform a linear search through a linked list to find the allocation they are freeing.

This would ideally want to be replaced with either a better data structure, such as a binary tree or hash table, or a completely from-scratch slab allocator that doesn't require a second layer of searching for allocation metadata.

While this performance impact is negligible right now and only affects safety-checked builds, the scaling cost is very poor and safe release builds cannot afford the same level of performance penalties as are acceptable in debug builds.

Deallocations perform a linear search through a linked list to find the allocation they are freeing. This would ideally want to be replaced with either a better data structure, such as a binary tree or hash table, or a completely from-scratch slab allocator that doesn't require a second layer of searching for allocation metadata. While this performance impact is negligible right now and only affects safety-checked builds, the scaling cost is very poor and safe release builds cannot afford the same level of performance penalties as are acceptable in debug builds.
kayomn added the
performance
label 2023-06-04 16:44:25 +02:00
Author
Owner

This issue is no longer relevant as we use the Zig standard library general-purpose allocator.

Whether this task is still relevant would be a benchmarking matter but I'm closing it for now pending becoming relevant again.

This issue is no longer relevant as we use the Zig standard library general-purpose allocator. Whether this task is still relevant would be a benchmarking matter but I'm closing it for now pending becoming relevant again.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kayomn/ona#18
No description provided.