Thread: Testpad for itoa()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    182
    Well, now we have a 50% test that confirms iMalc's itoas() is
    doing a good job.
    I've generated all the strings from "0" to "2,147,483,647" and compared
    the strings itoas() builds with mine.
    Everything looks just fine for positive numbers. I've still to test the
    negative ones, but something tells me it'll be OK as well.
    The version I've developed if quite fast, and takes some 2' for generating,
    formatting and comparing over 2 billion strings:

    Code:
                        Testing version : Nested_chars
                     ------------------------------------
     Testing on Intel Core 2 Duo E6600 2.4 Ghz // IA32
     OS = Windows 7 Ultimate 64 bit  --  Compiler = Pelles C 6.00.4
    
     Testing the numbers from: 0  to  2,147,483,647
    
     The generating/comparing process has taken:
     126,657 ms  to perform the whole cycle
    I'll attach the source code after some cleaning. and some sleep.

    Edit: better to attach the program now, and have your comments,
    I could have made errors that I don't realize at the moment.

    Let me know if you find something wrong, except for the goto
    Last edited by frktons; 07-13-2010 at 08:10 PM.

Popular pages Recent additions subscribe to a feed