note 106169 added to function.shm-attach

From: Date: Sun, 16 Oct 2011 00:07:05 +0000
Subject: note 106169 added to function.shm-attach
Groups: php.notes 
Request: Send a blank email to php-notes+get-183907@lists.php.net to get a copy of this message
You might expect the SHM functions to be significantly faster than building variables from MySQL operations. Unfortunately this is not the case regarding large multidimensional arrays. I've tested write, read, update and delete operations with with a two dimensional associative array directly with SHM and in comparison with a class using MySQL and a class using SHMOP functions (with mostly offset-accurate serialization). Both classes generated the same array as stored with SHM. Unlike SHMOP the performance of SHM decreases considerably with larger arrays. At 2000 instructions with an $array[$row][$key] of 200 rows and 5 keys even MySql is faster than SHM.This might be due to the fact, that SHM deals with any kind of arrays and makes internal use the PHPs powerful serialize() function. ---- Server IP: 69.147.83.197 Probable Submitter: 80.84.204.49 ---- Manual Page -- http://www.php.net/manual/en/function.shm-attach.php Edit -- https://master.php.net/note/edit/106169 Del: integrated -- https://master.php.net/note/delete/106169/integrated Del: useless -- https://master.php.net/note/delete/106169/useless Del: bad code -- https://master.php.net/note/delete/106169/bad+code Del: spam -- https://master.php.net/note/delete/106169/spam Del: non-english -- https://master.php.net/note/delete/106169/non-english Del: in docs -- https://master.php.net/note/delete/106169/in+docs Del: other reasons-- https://master.php.net/note/delete/106169 Reject -- https://master.php.net/note/reject/106169 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183907) next »