[sword-cvs] sword/src/utilfuns swbuf.cpp,1.18,1.19
Joachim Ansorg
joachim at ansorgs.de
Thu Jun 10 12:17:02 MST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I think a check for a null-pointer doesn't cost a lot of time, so IMHO it's
ok.
Anyway, SWBuf is slow if it gets passed around in lists etc. which means it
gets copied a lot. I think we need a copy-on-write mechanism in SWBuf :)
Joachim
> Modus operandi for the standard libs is usually to force this check out
> of the library, cf. strlen, strcat, et. al. It's a speed hit at these
> lower levels that might have to be fast. I like the check, but it might
> need to be removed when optimizing, and we can safely refer to the other
> standard c-string calls and point out their operation when passed a 0
> (not a "\0", by the way-- our code and theirs works fine when passed a
> "\0")
Joachim
--
<>< Re: deemed!
Joachim Ansorg
www.bibletime.info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAyLOzEyRIb2AZBB0RApIpAJ40dS2M52/jIyk7mGLptpNDGEWJRACgowHn
pJANg3P8oNimEQmYnfO/0gg=
=G91/
-----END PGP SIGNATURE-----
More information about the sword-cvs
mailing list