I'm guess this does not have to be cross-platform?
If not, I'll get something to you probably by tomorrow.
Printable View
I'm guess this does not have to be cross-platform?
If not, I'll get something to you probably by tomorrow.
1billion is possible. I'm not sure why others are having problems with RAM.
I can count to a googol no problem, but when you try to save the file (or any other way of saving) I get the 'problem' of not enough memory. as you could see in my previous post it cuts off at about 310M for me, with 2GB of ram.
on topic:
anyways, I'll try to compile an .exe for you to run, but it might take some time to get a 100% user friendly program, if you know what I mean.
good luck everyone ;)
[edit]:
Mail sent...
Ok, stupid me... I didn't get the time for when i started it but I did get a few times if anyone feels like figuring it out.
11:22pm (day 1) - Count was around 44,000
6:00am (day 2) - Count was around 391,000
4:00pm (day 2) - Count was around 917,000
5:39pm (day 2) - Count finished.
This is for 1 Million on a TI-83plus.
-CollinstheClown
1Bill isn't a problem, heck I've done it. (With one of the worst programming languages ever)
I sent mail. My java is so slow. 84 Seconds for 5 million. My VB6 is faster. Still optimizing, trying to figure out the best way to do this.
Hmm, probably depends on how you save your numbers. Java could be slower than VB6, but I think C or C++ should be even faster than basic... since I don't have a lot of experience in C I won't enter for that language, but I think there's a challenge for those who can program in C...
also in my previous post I said I could easily count to a googol when I don't store the numbers... well, that's not entirely true... In my program I use the 'long integer' variable, so I can only count to 18,446,744,073,709,551,615 since it is stored in just 8 bytes in the memory... There's probably a workaround for that too, but I don't have to know :P
I have kind of a nit picky question.
Do I have to measure the total program run time or just the time it takes to actually count the numbers?
Time it takes to output the numbers to a file.
Um, not quite, few are doing that, I can tell by the times (unless some one is running a raid array with some super fast SAS drives or those ramdisks, at least for those times under 1sec for 1M). The test is not seeing how long it takes to write to a file but how long it takes to generate the numbers in a retrievable manner. See the official rules:
So, I could write to a variable and that would count? Does it have to print them out afterwards?
If we are sending the source to XcOM to run, he should be able to verify that it isn't doing a 1, 2 skip a few sort of thing.
Just for the hell of it I wrote a 3 line piece of PHP code that would output the numbers to your browser. It's slow as sin if you lack a T1 connection, but it was interesting to see none the less.
I want to do this in VB 6.0, but I can't since I run a 64 bit system and lack the install for it. I might write it at school where they have VB 6 on all the computers.
I can give you a portable VB6 program that will work for all intents and purposes. PM for it if you want it.
TBCS doesn't condone copyright infringment and you are walking on very ice trace with that remark.
and to clarafy the rules, your program dosen't have to write a file, just display the numbers in some form, even if it runs through them as it counts, this is just to make my life easier when checking the programs to ensure your not cheating.
(I didn't produce the VB6 Portable. Considering I have a license, I use it as a utility at school.)
So it has to display all of them? That takes longer then writing a file
hm, I still haven't managed to get an MS Windows binary compiled, but I have been able to get a run time for 100 Million.
left an 848MB out.txt file... :)Quote:
[james@Deamon ProgChall]$ time ./count.bin
real 0m42.290s
user 0m30.738s
sys 0m4.768s
[james@Deamon ProgChall]$
EDIT: - ran 8m54.171s for 1,000,000,000
I'm impressed...
EDIT2: - Finally got a windows binary compiled. yaaaaaaaaaaaaaaaaay!
Email being sent in the next few minutes.
ok, comp is closing today, any entries not recived by tonight (9PM GMT) will not be counted,
Last chance to get your entries in.
I'm pondering if I should do it or not... because your 9PM is a lot different for me (6AM)
Can you send confirmation e-mail to those who sent you stuff? I only ask this because gmail does not like sending binaries:mad:, so I sent it in a 7zip archive last night.
that would be a good idea (may for future contests though ;) )
What I did to send all the files (including *.exe files) is zipping all the files just as you normally would do, and then change the extension to something else. I believe I changed it to*.zap for this competition.
All the receiving person has to do is changing the extension back to the original.
I think that would be the most easy way to send *.exe (or other prohibited) files via gmail...
Hmm, in that case I would most definately like to know if my mail actually was sent.
When I tried to send an *.exe file I got a message that for safety things... bla bla... could not send message.
Same thing happened when I zipped the files (*.zip)
but with the extension changed to *.zap I got no message telling me it was not safe or anything...
[edit]: Sent myself an email to confirm what I just said: Message pops up only with *.exe and *.zip. NOT with *.zap.
Also, when I changed the extension of the received file (at an other email account) back to *.zip it worked as it was supposed to work, I could read the zipped files...
maybe they had a change in policy?
OK, I don't know if you managed to get my submission before my server fell over... I'll email them in an archive if you haven't got them, just let me know.
:|
ok, comp close, the enteries are:
Trace,
Silverdeamon
Prince,
Helix,
Mtekk.
Tests will be run later and a winner announced
oh boy, oh boy! can't wait!
I'd really like to see how fast is actually possible...
btw XcOM, you've got a little typo in my name ;)
Thanks!
I'm thinking that after the winner is announced, we should release source code to both learn from how each other did it and so that we can get a group effort going to get the quickest time...
:D
Thanks
XcOM, it was fun!
Well, when the winner's announced... I'll post a link to my source. s'Not pretty, but it gets the job done. (And is possibly more complex than needs be...)
I'll be TBCS'd... :P
I probably will post it. It is nothing special, but it works well and measures time fairly accurately.
I'll post the source code I had (it's complete but didn't submit it in time)
K, sounds good guys
got one more program to test, all times are recorded in seconds to 3 decimal places.
Results should be in soon.
Ok, sweet. Well, I figured out how to make my program run on 4 threads. It was able to do 100 Million in 57 seconds for the longest thread :D
the results will be in soon, got them all, table is being made in a minute.