Hi all.

During the RFC doscussion today, the question popped up how the performance of
creating closures compares to creating objects. This is particularly relevant
for closures/objects created by bootstrap code which is always executed, e.g.
when registering with a CI framework.

Attached is a benchmark I quickly hacked up. It indicates that creating objects
is about 40% slower on my setup (PHP 5.4.9). I'd be curious to know how it
compares on HHVM.

In absolute numbers though, creating an object seems to take about one
*micro*second. That seems fast enough that we don't really have to care, I 
think.

Anyone want to try?

Cheers,
daniel
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to