Open dave-fl opened 5 months ago
Maybe :
which pool do you use
Pool<Test>
?
crate 'object-pool'
When using SpinLockObjectPool
things are similar. This is really a function of that page taking O(N) to find. If it was being pulled from a last known free page or tail, things would be different.
I add a bench with your test case https://evaillant.github.io/lockfree-object-pool/benches/criterion/reuse/report/index.html I think you're right.
I have atrocious perf for allocation. It was a waste of time for me.
Based on the docs this doesn't look right. I am getting much slower numbers with
LinearObjectPool
.Edit:
After looking at the code, I can see that the pages are a linked list so as pages become occupied the time required to find a new page increases. I suppose this is to be expected.
Here is the test: