Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Yep, 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 :)


Ah. Yes. I think you're right. I think PHP is still complied for 32-bit on Windows. That makes more sense.


Are 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.


Yes 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.


Sounds like you're running a 32-bit interpreter on your 64-bit machine.


Are you running a 64-bit build of PHP though?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: