Re: why should $_SESSION be slower than other arrays?
| From: | raditha dissanayake | Date: | Thu, 09 Sep 2004 14:15:26 +0000 |
| Subject: | Re: why should $_SESSION be slower than other arrays? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196216@lists.php.net to get a copy of this message | ||
John Holmes wrote:
From: "Aaron Voisine" <voisine@yahoo.com>The key here is the 'to the power of -05' bit. -- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar.I read in the docs several comments that $_SESSION is slower that other arrays. One comment even had benchmarking info indicating it was about half as fast. I don't understand why this should be. Isn't $_SESSION just a normal super global array like any other, except that it get serialized and written to disk *once at the end* of a request? Why on earth would this impact the performance of reading and writing in the middle of a request? Is there some funkyness going on under the covers that I'm missing? Can it be made to work as I described?Do you have links to these "docs"?? The following code gives me this: Normal $val: 9.4890594482422E-05 Session var: 1.1920928955078E-05