Attend Ilia’s talk keeping yourself in a sweet place :)

I like this idea, having live talks online about php or related topics. Ilia will give a talk about performace and php in the 2nd Live Talk of PHP|Symphony.

Having seen Ilia’s talk about similar topics (and discussed them a lot), it’s worth the price to attend, and learning php performance, with croissant, coffee and slippers cannot be bad :)

–Pierre

Your grand mother is a terrorist

A US judge asked how broadly the government viewed its power to hold detainees.

The administration lawyers answered that they believe the president would even have the right to lock up „a little old lady from Switzerland“ for the duration of the war on terror, if she had written checks to a charity that she believed helped orphans, but that actually was a front for Al Qaeda.

I’m scared. Please do something.

–Pierre

Realisme

<Derick> he says it works already, but as a hack
<tony2001> well, I like hacks =)
<Pierre_> do we need anything else than a stack of hacks?
<Pierre_> as far as they work :)
<tony2001> Apache(a stack of patches) + PHP(a stack of hacks) = web-server =)

.

Boutell backport AA from PHP

Not really new, but I did not read the GD site that much :)
In GD 2.0.26 (Changelog), they backport my antialiasing function introduced in php 4.3:
„Drastically faster, less memory-intensive antialiased drawing, thanks to Pierre-Alain Joye. This code was imported from the PHP ‚fork‘ of gd.“
They should backport the ellipse and filling functions I rewrote for php.

Break the rules (or need for speed #1)

Sometimes some has to process a huge amount of data, applying stupid tests and formulas. There I was and stuck on low performance problem.

The obvious way is to implement the critical part (the stupid tests and formula in C and process the data using the C implementation only), sadly it’s often not even possible to customize php.

Having reached a point where no further optimizations were possible, I start to see what is slow inside php or what I can add to make trivial tasks faster.

One test surprised me: get the sign of a number.

So I go for a new get_sign() internal function and these results:

get_sign: 0.095184011459351
php tests: 0.21789693832397

No comment as I’m pretty sure such new functions will be rejected, keeping in mind the famous „1 line php code“ rule. What’s about (default) speed is my only anwser.

patch: http://pierre.dotgeek.org/ze2/get_sign.patch
tests: http://pierre.dotgeek.org/ze2/get_sign_test.phps