C
Christopher
I am growing really tired of having to decypher 1000 functions that
were written to do simple operations on c-style strings that I could
do in 50 lines with streams and std::strings. My peer uses that same
old ,"Its more efficient " argument that I always hear. In fact, that
argument has grown into ,"we shouldn't use any of the STL containers,
because they allocate, which is expensive."
For example, I had to debug through 1500 lines today, that simply
replaced a token in a char * with another char *, because everything
to search for the token, convert characters to digits, check for
digits or alpha characters, shift things to make room, replace
elements, etc was all manually written. I could have done this easily
with a find and replace call from the STL .
Well, I am tired of it. I want to write a test and profile it. One
operation at a time. I am sure the differences are negligable,
especially when wieghing in the maintainability of the code.
Before I start spending time to disprove what hasn't even been proven,
I want to check if anyone has had to do this and has preexisiting
code? Or if anyone knows a reliable resource where I can get some,
instead of writing it from scratch? Also, any advice on how to write
such a test without having any points in it that could void the
results would be useful.
were written to do simple operations on c-style strings that I could
do in 50 lines with streams and std::strings. My peer uses that same
old ,"Its more efficient " argument that I always hear. In fact, that
argument has grown into ,"we shouldn't use any of the STL containers,
because they allocate, which is expensive."
For example, I had to debug through 1500 lines today, that simply
replaced a token in a char * with another char *, because everything
to search for the token, convert characters to digits, check for
digits or alpha characters, shift things to make room, replace
elements, etc was all manually written. I could have done this easily
with a find and replace call from the STL .
Well, I am tired of it. I want to write a test and profile it. One
operation at a time. I am sure the differences are negligable,
especially when wieghing in the maintainability of the code.
Before I start spending time to disprove what hasn't even been proven,
I want to check if anyone has had to do this and has preexisiting
code? Or if anyone knows a reliable resource where I can get some,
instead of writing it from scratch? Also, any advice on how to write
such a test without having any points in it that could void the
results would be useful.