RE: New rtrim()

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu