[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] %session
From:       Dave Rolsky <autarch () urth ! org>
Date:       2001-09-26 15:35:22
[Download RAW message or body]

On Wed, 26 Sep 2001, Tommi [ISO-8859-1] Mäkitalo wrote:

> faster is not to use regexp. You can write: substr($key, 0, 4) != 'CSP_'
> && $key != 'CSP_session_id'.

Actually, he needs to exclude anything matching /^CSP_/ or '_seesion_id'.
But while its true that substr is faster, the time savings is
infinitesimal compared to the real work going on in a script (most of
which is usually talking to a database or doing some other sort of
calculation).

There's no need to micro-optimize stuff like this.  People should use
whatever is most comfortable and maintainable.


-dave

/*==================
www.urth.org
We await the New Sun
==================*/


_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic