RE: New rtrim()
- Posted by cetaylor at compuserve.com Sep 14, 2001
- 420 views
Igor Kachan wrote: > > Yes, Colin, this function is not the noticeable > one for the putsxy.e perfomance. > > But try please the test below. > Igor, Your test program always returns an empty sequence instead of a slice, because your test sequences contain only zeros. This isn't a realistic test, and it gives you an artificially fast score for your version of rtrim(). If you make the test more realistic, with the majority of test sequences containing some non-zero values, you will find that both rtrim() have about the same speed. However, your code is shorter and easier to understand, which in my book counts for a lot. Regards, Colin