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
Hello,
I become curious after discovering your library and decided to give it try.
Problem is that I am unable to see any difference between your memory pool and the regular instantiation.
public class Foo
{
public Foo Init(int val)
{
SomeValue = val;
return this;
}
public int SomeValue { get; private set; }
}
int i = 0;
while(true)
{
i++;
var instance = Pool<Foo>.Get().Init(i);
//instance.SomeValue = 100;
Pool.Return(instance);
}
int i = 0;
while(true)
{
i++;
var instance = new Foo().Init(i);
//instance.SomeValue = 100;
}
In both the cases, subsequent instantiations does not allocate memory, but I believe this is due to the compile optimization which store the instance in cache and reuse it.
So, I must missing something!
Thanks
The text was updated successfully, but these errors were encountered:
Hello,
I become curious after discovering your library and decided to give it try.
Problem is that I am unable to see any difference between your memory pool and the regular instantiation.
In both the cases, subsequent instantiations does not allocate memory, but I believe this is due to the compile optimization which store the instance in cache and reuse it.
So, I must missing something!
Thanks
The text was updated successfully, but these errors were encountered: