You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the mops bench command to evaluate the performance of some libraries I'm developing. I've noticed an unusual behaviour in the heap benchmarks—they sometimes return negative values. I suspect this might be due to specific functions like replace(), get(), and delete() not making new heap allocations but instead releasing some of the allocated heap memory. As a result, the incremental garbage collector might be deallocating more memory than was initially allocated, resulting in negative values.
Another concern is the inconsistency of these results. When rerunning the benchmarks on the same codebase, the negative values are sometimes displayed on different columns. While this could be an issue with my implementation, I'm reaching out to see if you might know the root cause.
It seems like the incremental GC produces unstable results. I would recommend to use copying GC, I think I will change default GC in mops too. I have found that the copying GC produces more consistent results.
they sometimes return negative values
Yes, this is possible because mops counts heap in this way: <heap after benchmark cell run> minus <heap before benchmark cell run>
Hey @ZenVoich,
I've been using the
mops bench
command to evaluate the performance of some libraries I'm developing. I've noticed an unusual behaviour in the heap benchmarks—they sometimes return negative values. I suspect this might be due to specific functions likereplace()
,get()
, anddelete()
not making new heap allocations but instead releasing some of the allocated heap memory. As a result, the incremental garbage collector might be deallocating more memory than was initially allocated, resulting in negative values.Another concern is the inconsistency of these results. When rerunning the benchmarks on the same codebase, the negative values are sometimes displayed on different columns. While this could be an issue with my implementation, I'm reaching out to see if you might know the root cause.
Here are the heap benchmark results:
Heap (1) - GitHub Link
Heap (2) - GitHub Link
Your insights on this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: