ASP.net vs PHP / Linux vs Windows
Geizhals » Forum » Programmierung » ASP.net vs PHP / Linux vs Windows (23 Beiträge, 351 Mal gelesen) Top-100 | Fresh-100
Du bist nicht angemeldet. [ Login/Registrieren ]
.
Re: ASP.net vs PHP / Linux vs Windows
10.08.2009, 01:04:57
ich hab mal meinen kommentar dazu abgegeben, bin gespannt ob meine ip-adresse jetzt geblockt wird. ;-)



Sorry, some parts of these benchmarks are just a joke.

For instance, look at the Encryption-tests. They don't do the same. The ASP version does crc and crypt from the original string, while the PHP version calculates it from sha1.

Then, the SysVarArray stuff. You have a comment in your ASP-source that there are less such variables in ASP than there are in PHP. This in itself makes a comparison useless, of course - but why you additionally need to shuffle them in the PHP-version, only to sort them back after the loop, is beyond me.

Finally, the enormous peformance difference in the empty loop and empty function categories suggests that the ASP-interpreter seems to just optimize most of that away, while PHP doesn't. While this looks impressive, it doesn't have any relevance at all, because (hopefully ...) nobody would have have empty loops and empty function calls in real-world-code ... The same seems to apply to the String Assignment section, where you just assign the same string to the same variable all over again. Pretty easy to optimize this in a compiler/interpreter, but again this is of no practical value.

edit(h): ich weiss ja nicht, wie man "Senior Program Manager in Microsoft Corporation’s Developer Tools and Platform Group" wird, aber wissen wie man sinnvoll benchmarkt duerfte wohl keine anforderung sein ...

Oh, just noticed another nice piece in the Date-section:

ASP: DateTime NextWeek = new System.DateTime().AddDays(7);

PHP: $secNextWeek = time() + (7 * 24 * 60 * 60);

Just because PHP doesn't seem to have a similar AddDays() function (or does it? I don't know PHP and don't bother looking that up), you don't need to be that rude and let it calculate (7 * 24 * 60 * 60) in every loop iteration, do you?

If that doesn't appeal to you, you could of course let ASP do the square root of 49 each time.







10.08.2009, 01:36 Uhr - Editiert von japh, alte Version: hier
Antworten PM Übersicht Chronologisch Zum Vorgänger
 
Melden nicht möglich
 

Dieses Forum ist eine frei zugängliche Diskussionsplattform.
Der Betreiber übernimmt keine Verantwortung für den Inhalt der Beiträge und behält sich das Recht vor, Beiträge mit rechtswidrigem oder anstößigem Inhalt zu löschen.
Datenschutzerklärung