I have look into some modules of Drupal core, and I found some issues:
For example, this code in locale.inc
for ($i = 3; $i <= count($entries); $i++) {
$english[] = $english[1];
}
If $entires is huge number... that will cause a huge amount of function calls
Also, ++$i is faster than $i++, --$i is faster than $i--. Maybe it's better to change all $i++ in the for loops into ++$i.
And, some loops can be looped backward, like this one in xmlrpc.inc