Optimize Ona Heap Deallocation in Safety-Checked Builds #18
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kayomn/ona#18
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
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.