Re: Smart strings & memory allocation
| From: | Sascha Schumann | Date: | Wed, 18 Jun 2003 15:24:34 +0000 |
| Subject: | Re: Smart strings & memory allocation | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-2384@lists.php.net to get a copy of this message | ||
> fairly certain that doing 100 000 allocations of 20 bytes is a whole lot
> 1) slower and 2) more memory consuming than allocating 2 megs at once.
Of course. That's not the point though. The point is
whether the difference matters in the global picture.
You can optimize almost everything; but if the problem accounts
only for a minimal spectrum of the whole execution time, you
are simply wasting your time with micro-optimizations.
- Sascha