Le 30/05/13 06:34, Tim Starling a écrit :
With the PHP package used at Wikimedia (5.3.10-1ubuntu3.6+wmf1), with
taskset 1 nice -n-10, I get:
Added that to a maintenance/benchmarks/README file:
https://gerrit.wikimedia.org/r/66066
--
Antoine hashar Musso
For the record, the times I mentioned above were user time and not real
time, so changing the priority or affinity of the process wouldn't really
affect it that much.
*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
www.whizkidztech.com |
So I ran a brief benchmark on my vagrant instance recently (nothing fancy,
just 50,000 iterations of a single line of code), and I found that
htmlspecialchars() performs *significantly* faster than strtr() (a
difference of like 37%).
Html::element (and other places in the Html class) prefer using
On Wed, May 29, 2013 at 10:21 AM, Tyler Romeo tylerro...@gmail.com wrote:
So I ran a brief benchmark on my vagrant instance recently (nothing fancy,
just 50,000 iterations of a single line of code), and I found that
htmlspecialchars() performs *significantly* faster than strtr() (a
difference
On Wed, May 29, 2013 at 10:30 AM, Chad innocentkil...@gmail.com wrote:
Sounds like you're comparing apples to oranges here. What
happens to the speed when you change Html::element() and
friends? To (average) page size?
It seems to reduce the loading speed by about half a millisecond (kind of
Le 29/05/13 16:21, Tyler Romeo a écrit :
So I ran a brief benchmark on my vagrant instance recently (nothing fancy,
just 50,000 iterations of a single line of code), and I found that
htmlspecialchars() performs *significantly* faster than strtr() (a
difference of like 37%).
Html::element
On Wed, May 29, 2013 at 1:39 PM, Antoine Musso hashar+...@free.fr wrote:
Le 29/05/13 16:21, Tyler Romeo a écrit :
So I ran a brief benchmark on my vagrant instance recently (nothing fancy,
just 50,000 iterations of a single line of code), and I found that
htmlspecialchars() performs
On Wed, May 29, 2013 at 1:43 PM, Chad innocentkil...@gmail.com wrote:
Perhaps. But if it's only marginally faster (like, half a ms), then the
reduced
output probably saves more in the long run. But without actual numbers
we're really just guessing at possible micro-optimizations.
Very true.
On 30/05/13 00:21, Tyler Romeo wrote:
So I ran a brief benchmark on my vagrant instance recently (nothing fancy,
just 50,000 iterations of a single line of code), and I found that
htmlspecialchars() performs *significantly* faster than strtr() (a
difference of like 37%).
37% for the larger
On Wed, May 29, 2013 at 9:26 PM, Tim Starling tstarl...@wikimedia.orgwrote:
37% for the larger replacement array in Html::expandAttributes(), or
for the smaller one in Html::element()? And what was the test case
size: how many replaced bytes compared to non-replaced bytes?
If it was the
On Wed, 29 May 2013 18:33:03 -0700, Tyler Romeo tylerro...@gmail.com
wrote:
On Wed, May 29, 2013 at 9:26 PM, Tim Starling
tstarl...@wikimedia.orgwrote:
37% for the larger replacement array in Html::expandAttributes(), or
for the smaller one in Html::element()? And what was the test case
On Wed, May 29, 2013 at 10:22 PM, Daniel Friesen dan...@nadir-seen-fire.com
wrote:
Also, I'd be interested to see those benchmarks re-run on PHP 5.4 now that
I we know that they changed the algorithm.
On PHP 5.4:
htmlspecialchars with ENT_NOQUOTES: 8.548s
htmlspecialchars without
On 30/05/13 11:33, Tyler Romeo wrote:
Ran another test. I tested on the string
'herllowodsiojgdsd^6' repeated 50 times, and I ran the
replacement function 500,000 times. The results were:
htmlspecialchars with ENT_NOQUOTES: 14.025s
htmlspecialchars without ENT_NOQUOTES: 13.457s
strtr:
13 matches
Mail list logo