View Single Post
Re: Strings In United Bot
Old
  (#17)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Strings In United Bot - 31-05-2004

You can almost always make something faster than what's provided in a standard library, but usually only for specific cases (i.e. you usually can't make something significantly faster that handles the same features that the standard library function handles, if you could, someone would have replaced the standard library function with faster code long ago).

Magnus, I think you are focused on a few issues with STL strings (such as using a null terminator or splitting a string) that you assume other people would want (when they might not need or care about those).

If you want to create your own string library then other coders are required to learn your syntax instead of using what they already know. It would be sort of like replacing the C++ stream I/O (cout, cin, cerr, etc.) with your own input/output library of functions because some of the stream I/O functions were slow or confusing.

I'm not sure that speed is that big of an issue for string operations unless you are doing LOTS of string operations very frequently. For something like a database application or a word processing application, string operation speed would be critical, but for something that's using mostly mathematical operations, string performance probably isn't that critical.

botman
  
Reply With Quote