Closed francisbesset closed 3 years ago
Did you notice a real impact on performance?
Hi!
Thanks for your suggestion. I must say introducing a new class on top of Elastica is a big deal and it must be done only if highly necessary.
In the case of count
I'm really curious about possible performance impact your contribution brings, do you have any numbers to share?
Thanks!
Did you notice a real impact on performance?
With a quickly phpbench, count() function is 5-10% slower than an increment var.
I mean, in a real project 😁 It looks like a premature optimisation
Hello @francisbesset
Thanks for your patch, but as I said in my previous comment, I don't think this optimisation is really useful.
That's why I'm closing this PR.
Anyway, thanks for the work :)
Avoid to use
\count()
on each action, just increment and read a variable for better performance.