4 ms·
Did anyone else even try running his suggested code? I think maybe he has a problem with his setup. I don't get those numbers. My numbers for PHP 5.3.8: Wi
by pacmon 15y ago
Did anyone else even try running his suggested code? I think maybe he has a problem with his setup. I don't get those numbers.
My numbers for PHP 5.3.8:
Windows 7 -
8524568 bytes (using range)
3600584 bytes (using SplFixedArray)
Fedora 14 -
7724600 bytes (using range)
3200568 bytes (using SplFixedArray)
*edit - Added numbers for SplFixedArray
- Robin_Message 15y agoAre you on 32-bit, because all his numbers are for 64-bit, except the large table near the beginning, which matches roughly with the numbers you give.
- pacmon 15y agoYes and No. I run a 64-bit Windows 7 machine, but oddly enough the Fedora 14 machine is 32 bit. Yet it yields similar numbers to the 64-bit Windows.
- dangrossman 15y agoSounds like you're running a 32-bit interpreter on your 64-bit machine.
- Klinky 15y agoAre you running a 64-bit build of PHP though?
- nikic 15y agoYep, I already got some comments on that. You are either using a 32 bit system or a 32 bit binary (at least I think that the binaries PHP distributes for Windows are compiled for 32 bit, so even if you are on a 64 bit Windows you'll still get 32 bit numbers). The Windows number still is 8 bytes per element larger than the number I wrote (76 per element). This might have various reasons, one could be that it was compiled with head protection :)
- pacmon 15y agoAh. Yes. I think you're right. I think PHP is still complied for 32-bit on Windows. That makes more sense.