[Python-Dev] sstruct

Lalo Martins lalo@laranja.org
Tue, 31 Dec 2002 19:11:48 -0200


On Tue, Dec 31, 2002 at 08:38:15PM +0100, "Martin v. Löwis" wrote:
> >Heck, I would have used it instead of struct in all places I ever used
> >struct, if I knew about it before :-)
> 
> Can you explain why? Isn't it much slower than struct?

I haven't yet tested its speed, but Just claims it's just a bit slower.

However, in a choice between clarity and speed I almost always, scratch
that, always choose clarity.  Then *if* I have performance problems I go
back and speed up where I can, as long as I don't compromise clarity beyond
some reasonable arbitrary limit.  The struct module, however, falls a lot
beyond this limit, and if I had a choice I wouldn't even have used it at all.

(Short answer: Mu.)

[]s,
                                               |alo
                                               +----
--
            Those who trade freedom for security
               lose both and deserve neither.
--
http://www.laranja.org/                mailto:lalo@laranja.org
         pgp key: http://www.laranja.org/pessoal/pgp

Eu jogo RPG! (I play RPG)         http://www.eujogorpg.com.br/
GNU: never give up freedom                 http://www.gnu.org/