>_<
So I'm the only one using `log2', `sin', polar coordinates, and a massive array to do this?
FINE!
*thplblblbltlttlbltl*
Soma > off to pout
Y E S ! ! ! By all means. Game over. Let's play something else. :-)
The coauthor of my version pointed to the problem of not correctly handling
string termination, so He [clive] suggested to add this line of code:
and now the 'L' terminated string problem is over. The timings are actually:Code:x = len_str; buffer[x--] = 0;
About 1.2 seconds.Code:Testing version : 0.60 -------------------------- The value of num is: -1234567890 The formatted value of num is: -1.234.567.890 Elapsed ClickTime: 1.177 to perform 10.000.000 cycles of the formatting function
In the next days I'll try the code some of you have posted, but I've to
adapt it to the testpad, so it'll take a while. :-(
I've also to add a function to generate random numbers, and
the display of the results for the various versions. No time at the moment.
And in 5 minutes I tryed iMalc smart solution:
That looks like the potential winner so far :-)Code:Testing version : 0.60 -------------------------- The value of num is: -1234567890 The formatted value of num is: -1,234,567,890 Elapsed ClickTime: 463 to perform 10,000,000 cycles of the formatting function
Last edited by frktons; 07-07-2010 at 10:02 AM.
@Elysia:Code:But you didn't, and therefore it complained about it being a POSIX function. All I did was point that out. Can we agree to stop this now? If you say yes, I'll say yes.
I didn't add the underline, because my compilers either don't allow and/or require it. That was the only ultoa() function that was portable between my two compilers.
You did not just "point it out", you launched into your same old tirade about my compilers, and I'm tired of you whining about them. I've spent several hundred dollars on these compilers, and I have some large programs that don't work on any other compilers. I need to use these two compilers. You can .......... and moan about it as long as you like.
Ah! Ah! Ah! Ah! Ah! :-)
From my point of view you can use whatever you like, whenever you
think it is fitted for your pourposes, and to whatever extend you can imagine.
:-)
By the way, did you come with any turbo C/MSVSC/WTK idea about the
main task of this thread?
Let me know and enjoy.
One program from each one, actually. I'm looking forward to seeing how Whiteflag's, Soma's, and iMalc's programs do in your testing.
Last edited by Adak; 07-07-2010 at 04:51 PM.
@cyberfish:
if you can help me solve these compiling errors of your code
I can try it on my testpad:
Code:error #2048: Undeclared identifier 'BUF_LEN'. Missing prototype for 'memmove'. *** Error code: 1 *** Done.
Hi whiteflags.
I tried your code, but it displays million lines on the screen,
so it is not something I can test for performance. :-(
What should this test program shows? Remember I'm a beginner
and many things are obviously unknown to me.
I can analyse your code with my eyes, not with a profiler for the time
being, and get some insight/inspiration from it. But if you think it is
worth to try for performance, please post a suitable version.
Thanks
O_o
I'm sorry for the confusion. I did not post any source.
I only posted that comment to playfully mock the other posters.
*shrug*
Anyway. What can you really expect from a 1800 MiB array loosely indexed by repeatedly dividing `double' values?
Soma
And I am getting tired about your using of old non-standard compliant compilers which is completely against the spirit of the boards. You are using the very same compiler/IDE that we urge newbies on the board to avoid. You're not helping when you post code compiled in that because it creates the exact kind of code that we do not want newbies to use/see/become familiar with.
You are free to use these compilers as you need for your large projects, but why can you not simply use a modern standard compiler when creating new projects and sharing newly written code with newbies? Is it too much to ask?
There are free alternatives out there! You don't have to spend a dime on that.
@frktons:
Instead of quadraple posting, please use the edit button. You can quote multiple posts at once. There is a button for that.