Well congratulation to Merri...his code was realy fast. And Bodwads code is still slow as hell...:D....his code is not even in a module....shot him...:D
Printable View
Well congratulation to Merri...his code was realy fast. And Bodwads code is still slow as hell...:D....his code is not even in a module....shot him...:D
Hi,
Gongrats to the winners :thumb: and thanks everyone for an enjoyable contest.
BTW, I think it's completely lame to just post overall marks without a basic breakdown (speed of algo, overall speed, code readability, negative points for assumptions, error handling or whatever).
Cheers,
NTG
Hey stop complaining I won :afrog:
Did you use the same timing module noteme? :afrog:
99/100 read it and weep.
Quote:
Originally posted by BodwadUK
Did you use the same timing module noteme? :afrog:
Off course I did.....look who posted it.....;)
NoteMe I told you yestaday that there was a mistake when Bodwad's code was tested. I thought Pino would have annouced it offically by now though :confused:.
Then do the times of those that Noteme list seem to accurately correspond with the actual testing results?
I couldn't say but I know that the timing problem only effects bodwad, so the other rankings will keep its order just Bodwad will move down the list :).Quote:
Posted by NotLKH
Then do the times of those that Noteme list seem to accurately correspond with the actual testing results?
sorry for delay i had to re-test everyones code again,
firstly let me appoligise for this!
the results have changed slightly because of a mix up with the timing n Bodwads entry! the Vb.net entries are fine, but the VB6 ones have changed ever so slightly!
again i am sorry for the mix upCode:
VbasicGirl 33
Acidic 37
BPD 38
NotLKH 39
Cyborg 39
Riis 46
RobDog 55
BodwardUK 59
StephenHickerson 63
Ex-FB 65
Dsheller 68
Merri 74
NoteMe 78
SeniorBadger 85
Dave Sell 92
Hmmm.
As has been mentioned, how do those scores breakdown, since it was, although primarily going to be based on speed, other factors were going to be considered.
And, we ALL are dying to know the actual timings.
Is Bodwads actually that much faster than mine?
:)
-Just wondering
-Lou
PS:
Seems its an Olympic Moment.
Couldn't you let Bodwad keep his gold?
Be an Honorary CoWinner?
they corrispond via the following equation:
y=1.45x^5 - 23.583x^4 + 137.42x^3 - 337.92x^2 + 305.63x + 11
where X is the speed and y is the score
view attachment for graph
Bhahhhaa...I am number 3 now..::D
Intresting update....thanks to NotLKH for noticing...;)
Now Dave Sell is on the test bench...;)
'Quote:
Originally posted by NoteMe
The way it is tested. It is tested on a 1900+ machine both compiled and in the IDE. I am running the test 5 times, and the time under here, is the average og test 2-5.
IDE:
Code:Bodwad2: 0.21540 sec
Bodwad: 0.21177 sec
Cyborg: 0.02351 sec
Dave Sell: 0.20854 sec
NotLKH: 0.01567 sec
Merri: 0.00629 sec
Ex-FB: 0.00580 sec
NoteMe: 0.00567 sec
Compiled:
Code:Dave Sell: 0.12635 sec
Bodwad2: 0.05478 sec
Bodwad: 0.0530 sec
Cyborg: 0.00959 sec
NotLKH: 0.00571 sec
Ex-FB: 0.00485 sec
Merri: 0.00467 sec
NoteMe: 0.00417 sec
How the hell did the slowest code on earth win....:D
And with even more help from NotLKH.....We tested SeiorBadgers code, and we even optimised the command click event a bit....and it is still slower then my grandmother.....Pino...I refuse to belive that you tested all of the apps again after we pointed out that you did something wrong...:D
Intresting update....thanks to NotLKH for noticing...;)
Now Dave Sell is on the test bench...;)
Quote:
Originally posted by NoteMe
The way it is tested. It is tested on a 1900+ machine both compiled and in the IDE. I am running the test 5 times, and the time under here, is the average og test 2-5.
IDE:
Code:SeniorB: 0.41167 sec
Bodwad2: 0.21540 sec
Bodwad: 0.21177 sec
Cyborg: 0.02351 sec
Dave Sell: 0.20854 sec
NotLKH: 0.01567 sec
Merri: 0.00629 sec
Ex-FB: 0.00580 sec
NoteMe: 0.00567 sec
Compiled:
Code:Dave Sell: 0.12635 sec
SeniorB: 0.11036 sec
Bodwad2: 0.05478 sec
Bodwad: 0.0530 sec
Cyborg: 0.00959 sec
NotLKH: 0.00571 sec
Ex-FB: 0.00485 sec
Merri: 0.00467 sec
NoteMe: 0.00417 sec
If it was me who did this contest, I would have said it was more or less draw on the speed between Merri, Ex-FB and NoteMe. And voted the prettiest of those 3 codes as the winner, and added NotLKH as a goooood 4th.....well thats at least my 2 cent...
Still Bodward?
In fairness, this was just a test competition. So how about we leave it and go on to the next one. One thing though I think we've learned is that if we're going to time a competition in future, then maybe the judges should provide the code for the timing module and make us put it in first. And all code has to go between the timer start and the timer stop (so no showing forms after the timer has stopped etc.)
I think as a test it has worked well and done it's job in ironing out the bugs in the system. I'm sure there will be more problems in future contests, but none of us should take this too seriously, it's a bit of fun, and it'll just keep getting better and better I'm sure, and eventually it'll run as smooth as clockwork.
Btw, NoteMe, could you time so that you update my small mistake on my submitted code (really stupid, just didn't bother to submit updated code) and test the algo again?
Comment out D = A \ 2 lines, then set A \ 2 instead of D to the inner loop line between the out commented lines. This should speed up the algorithm code nicely. Silly mistake, but... :D
Hmm... looks like I'm the only one who made a flexible code. Nobody else seemed to allow to give almost any number to test to. And I got no bonus for doing so either.
Anyways, here is my test for the fastest algorithm (atm only me vs. NoteMe, for being fastest with the compiled code):
With this I mean the speed of the actual algorithm. No output to listbox and no initialization of the arrays or other variables included. Only the algorithm itself.Code:Merri: 0.020394 ms
NoteMe: 0.071517 ms
Tested/testing code for Merri (this is the slightly fixed version):
VB Code:
Set Q = New sTime Q.Init Q.StartTime A = 3 B = 9 Do While B < Total C = A + A Do While B < Total NumberTable(B \ 2) = True B = B + C Loop A = A + 2 Do While NumberTable(A \ 2) A = A + 2 Loop B = A * A Loop Q.StopTime MsgBox Format$(Q.RetTime * 1000, "0.000000") & " ms"
Tested/testing code for NoteMe:
VB Code:
Set Q = New sTime Q.Init Q.StartTime For i = 3 To 7919 Step 2 If Not (IsComposite(i)) Then For j = i To 7917 \ i Step 2 IsComposite(j * i) = True Next j End If Next i Q.StopTime MsgBox Format$(Q.RetTime * 1000, "0.000000") & " ms"
I removed comments from the code to reduce length of the message. Tested machine details:
AMD Athlon XP 2200+ @ 1800 MHz
1024 MB DDR @ 333 MHz
ASUS A7N8X-VM/400 mini-ATX motherboard
Ex-FB: if you didn't notice, we're doing all this stuff at the moment for fun :D
:p Yeah, sorry I didn't mean to sound serious, just didn't want the competitions to stop becuase of all the complications.Quote:
Originally posted by Merri
Ex-FB: if you didn't notice, we're doing all this stuff at the moment for fun :D
And, if your really trying to compare speed of code, you should really both set your columns to zero as per the rules, seems I'm the only one who obeyed that ruling :p, or alternativly put my multi-column code back in... it knocks quite a chunk off on my machine...:thumb:
Having multiple columns isn't unfair. I did it with the pure listbox control. Only having multiple values in one item was against the rules ;) Besides there is no speed gain whatsoever by having it in multiple columns. I used multiple columns mode because it looks much better that way imo. But as you can see, I got no bonus for making the app visually attractive and user friendly :(
Well the actual quote was (from Pino or Electroman I can't remember)
Which does imply more than one per line is to be frowned upon.Quote:
My first reaction was that the rules already said one per line and I then checked and saw it wasn't in. I then said well if it is allowed then it would loose points for appearance unless it was done very well with proper indenting or something like that. And as you can see after checking with others the change was made.
And adding columns makes a huge difference. Mine went from 15ms down to 10.5ms just by setting the column value from 0 to 4.
Well after testing all three (I've included your change and I've set mine to 4 colums) I get [compiled] averaging 5 indiviudal runs.
NoteMe: 11.02 ms
Ex-FB: 11.40 ms
Merri: 11.58 ms
So, it's pretty much down to random variances in speed. The speed difference with the columns might be explained by the fact that have a really poor graphics card on my main dev machine. I might run them on my games machine, but it's currently occupied (one of my daughters is playing Gauntlet :) )
I still have a speed disadvantage when using a listbox, because I didn't optimize for it, so you shouldn't have anything to complain about :D
Well it will be ZERO speed diffrence in the code if you have a X800 card or a Voodoo 5 card. Unless you have a FireGL card or something it will show up as a diffrence, and even then a small one. And I agree. The diffrences in out time is probably too small too pick a winner and a second and 3rd place from it.....Quote:
Originally posted by Ex-FB
Well after testing all three (I've included your change and I've set mine to 4 colums) I get [compiled] averaging 5 indiviudal runs.
NoteMe: 11.02 ms
Ex-FB: 11.40 ms
Merri: 11.58 ms
So, it's pretty much down to random variances in speed. The speed difference with the columns might be explained by the fact that have a really poor graphics card on my main dev machine. I might run them on my games machine, but it's currently occupied (one of my daughters is playing Gauntlet :) )
Except if you concentrate on the algorithm speed only... see that nice post up there, my algo is 3.5 times faster than yours :D Guess I'll have to test Ex-FB's too.
Yeah but that was not the contest...;)....I had an other algo that was much much faster, but I couldn't add more then just a few of the primes to the listbox in the first loop, so I had to add an other one afterwards, and then it got 0.1ms slower then the one I posted...that could possible have beaten you....but as I said...it was not the contest, the contest was with the listbox...;)
And the current results:
Merri: 0.020394 ms
Ex-FB: 0.023467 ms
NoteMe: 0.071517 ms
Tested/testing code for Ex-FB:
VB Code:
Set Q = New sTime Q.Init Q.StartTime lngLowPrimeCount = 0 For s = 3 To 9 Step 2 For t = s To 9 Step 2 bytNotPrime(s * t) = 1 Next t Next s For t = 3 To 90 Step 2 If bytNotPrime(t) = 0 Then intLowPrimes(lngLowPrimeCount) = t lngLowPrimeCount = lngLowPrimeCount + 1 End If Next t For s = 0 To lngLowPrimeCount - 1 lngNextPrime = intLowPrimes(s) For t = lngNextPrime * lngNextPrime To 7919 Step (lngNextPrime + lngNextPrime) bytNotPrime(t) = 1 Next t Next s Q.StopTime MsgBox Format$(Q.RetTime * 1000, "0.000000") & " ms"
And as said, I'm doing this only for fun, just like you're doing with the listbox thingy. I could now update my code so that it would be a rocket with listbox stuff too, after taking a look on some of the code :)
If you want, you can compare with your faster code too! ;)
Edit Heh, noticed I had some listbox adding code in Ex-FB's sample, thus the timing is now faster. Close to mine :) Though, I'm still the only one with flexibility.
Will do it when I get home....will be fun to see..
:lol: I wondered how on earth I had won
We too, and now we wonder how Dave Sell won, and SeniorBadger came on second.....:D
I feel this is never going to rest :afrog:
ok there was a mistake with bodwads code but the rest of the results are right i'm certain of that :) i've tested them twice now :)Quote:
Originally posted by NoteMe
We too, and now we wonder how Dave Sell won, and SeniorBadger came on second.....:D
Must be persecution I swear :lol:
I still think Pino is doing it wrong... :D
Pino, you sure you don't see E+something in the end of Dave's and Senor's times? ;)
This is the clearest way to display the results, I guess:
VB Code:
MsgBox Format$(Q.RetTime * 1000, "0.000000") & " ms"
:)
Will we ever get a breakdown on why and how people got their points?
Now merri sit down
breath deeply
and relax..
Now you lost you loser loser loser loser
MOAHAHAHAHA :lol:
Bodwad, I'm gonna take you to China soon.
So sit down.
Breath deeply.
Relax.
They're gonna eat you :D
Pino, I asked before.Quote:
Originally posted by Pino
ok there was a mistake with bodwads code but the rest of the results are right i'm certain of that :) i've tested them twice now :)
I had submitted a dog of a code.
Slow, not meant to win, no optimization whatsoever.
THAT would have placed in the bottom 4 in speed.
I replaced it with some pretty good code.
You DID use the right code?
Now, this WAS a competition. Open, Friendly, Educational.
As such, there were no expectations of secrecy.
We can ALL see each others code.
We can ALL compile and run each others, compare theirs against ours, and form opinions as to who achieved the speed goal best.
And so we certainly expected an open evaluation, a public display, of our scores, not just a "What are they", but also "Why are they".
You've succeeded in giving us the "What".
Now, how about the "Why"?
:(
Hmmm.
Again, Pino,
If you've not read all the posts, you might not have noticed.
In both your lists, Look at BodwardUK.
:wave:
We were allowed to resubmit code? :ehh: :ehh:
I really need to learn to pay attention.
Mmmm. Hotdogs.Quote:
Originally posted by Merri
They're gonna eat you :D
Worse, I have a built in Intel graphics card with some funky sounding name which means it's about as fast as a drugged tortoise. But that's fine, I knew that when I bought it, it was only so i could play with Server 2003 (but now It's somehow ended up as my main dev machine.... don't ask me how :) )Quote:
Originally posted by NoteMe
Well it will be ZERO speed diffrence in the code if you have a X800 card or a Voodoo 5 card. Unless you have a FireGL card or something it will show up as a diffrence, and even then a small one. And I agree. The diffrences in out time is probably too small too pick a winner and a second and 3rd place from it.....
Quote:
Originally posted by Pino
ok there was a mistake with bodwads code but the rest of the results are right i'm certain of that :) i've tested them twice now :)
I am pretty sure you where drunk while you where testing them....and that you are still drunk that can say something like that...look at the times....Dave Sells and SeniorBadgers code is about 30....I repeat 30 times as slow as my, Merri, and EX-FBs code....
Well I tested the top scores down to mine just to bring in another opinion, and I think I can safely agree with the others, Dave Sell and SenorBadger seem way to slow to be winners.
Pinos Results:
My timing resultsCode:StephenHickerson 63
Ex-FB 65
Dsheller 68
Merri 74
NoteMe 78
SeniorBadger 85
Dave Sell 92
StevenHickerson .0293
Ex-FB .0346
Dsheller Untestable, missing function in zip that I downloaded.
Merri .0186
NoteMe .0137
SenorBadger .8021
DaveSell .4975
Now If I was judging Dsheller would be disqualified because of the missing function in his zip, but maybe something happened that I dont know about and he actually got his file to Pino appropriately.
Although my aglo is faster than Ex-FBs, I believe his presentation is better so I would agree with the scores given there.
Now dont want to hurt any feelings here but DaveSells.. his code, not that spectacular, actually feels a little overcoded for such a simple project. Uses multiple classes and such.. just seems to be a waste of system resources for the intended result. His time is slower than most others as well. Definately not enough 'sexy' code to make up for the almost half a second differnce in speed.
Then SenorBadger, his code is definately not sexy. No indentation in some areas, and no casing in function names to help distinguish them. And then he has the slowest out of the times I tested at nearly a full second to generate the primes.
Merri, code looks nice fast time, but slower than NoteMes. Also must mention here Merri went way beyond the requirments of the contest, but seeing the type of contest it is can't really give her any extra points for that. Sorry Merri but in fairness your only being given points on what was required.
NoteMe - fastest out of the tested code, code itself is average 'sexyness'. Merri's display is little better, and with such close times I would put NoteMe and Merri at a tie due to appearences.
So if I were judging out of the tested results I would put them in this order
NoteMe & Merri - 95 (Tie)
Ex-FB - 87
StevenHickerson - 85
DaveSell - 70
SenorBadger - 50
DSheller - Disqualified.
(Note this point system in no way relates to Pino's its one that I made myself with speed weighing heavily since it was the primary goal of the contest).
My Testing System:
P3 1.2 Ghz w/ 512Mb Ram
Non Compiled testing only
Code was run 5 times each and the average was taken as the time given.
Just my view on the situation, but like said before this was just a test contest and meant to be fun, I think in future contests the judging needs to be quicker and more accurate. It took what 2 weeks to get seemingly badly inaccurate scores. I dont want to get the judges up set with that statement, but its just my observation.
Well Merri added more things to it, but it was two things that I would just comment on his project...don't take this the wrong way...it is positive critisism...something to grow on.
Names like:
Find old primes
and
Find new primes
is not good names on command buttons. What the hell does that mean....straighten things like that up. And the other thing was that he uses the deafault name on the command buttons so they are called Command1 and Command2...that is not sexy. Except that it was a great app.
ØØ
Whoa, I posted even more the wrong one! I sent an older zip. I did remove the older button from the app. Oh well. Doesn't kill me. Anyways, for the return feedback: InitApp? Doesn't even allow to compile :D
Oh, btw, the captions were Find primes OLD and Find primes NEW... OLD for earlier version of the code and NEW for a speed improved one. Anyways, should've been more careful with the sent source.
What....what have electroman done...:D...he deleted my post...and made a new one...that rascal.....
I notice everyone is keeping VERY quiet about my score. Can't think why.
This is my 1000th non-chitchat post by the way, w00t!
Because nobody is interested on...what was it called... .ORG or something ;)
No one cares about .NET....I am pretty sure that if all the VB6 codes where transelated to .NET then all of them would beat you...:D
I see Pino hasn't popped in yet.Quote:
Originally posted by NotLKH
Hmmm.
Again, Pino,
If you've not read all the posts, you might not have noticed.
In both your lists, Look at...
hmmm.
looks left, glances right, nope, no one looking...
BodwardUK
:wave:
:pQuote:
Originally posted by wossname
I notice everyone is keeping VERY quiet about my score. Can't think why.
Hard luck mate, I checked your code. 0.143 seconds!!! That's like 143 milliseconds, that's like 15 times slower than the mine, Merri's and NoteMe's code!!! :p
I put the start timer where you said in your code, but the bit for the end timer, that was all screwed up. Sorry mate, you have to stop the timer after the form has been shown.... nice try though!
Oh, P.S. I'm sorry to hear you live in Derby, I hope you recover soon ;)
Ahh, but you see, he WON!Quote:
Originally posted by Ex-FB
:p
Hard luck mate, I checked your code. 0.143 seconds!!! That's like 143 milliseconds, that's like 15 times slower than the mine, Merri's and NoteMe's code!!! :p
I put the start timer where you said in your code, but the bit for the end timer, that was all screwed up. Sorry mate, you have to stop the timer after the form has been shown.... nice try though!
Oh, P.S. I'm sorry to hear you live in Derby, I hope you recover soon ;)
Good Job!
:)
Yeah don't forget that he won....he won paralympics....but still he won...
now seriously....good job...:)
Yea Pino says he's gonna be off-l;ine for a couple of days. But by looking at the timing I can safely (almost) say that you can assume the top two will also change too. I don't think the presentations points were enough to bring them back from the times that I got when i tested it. Unfortunetly I don't have access to those so can't say 100% but I'm pretty sure ;).
Now this wasn't a mess at all. It wasn't a failure either. It wasn't a something gone badly wrong.
It was a disaster called Pino the Flying Squirrel :D
Hey hey hey....go easy on him.....it is an error everyone could have done. And it was a testing contest. Well he did an error, but he is at least man enough to look at it again, and it looks like he is man enough to change the results if they are wrong too.
Looking forward to see his results.
ØØ
But one's gotta make most out of it now when he can to make sure it doesn't happen again?
Nah, I'm just evil ;) Don't care too much about me, Pino.
Electro,
Think we can get a breakdown of these presentation points, along with the actual times, when all is said and done?
-Lou
Don't think so, we had decided we'd just give the Overall scores, But I suppose we could give you the timings too once they have been redone though :).Quote:
Posted by NotLKH
Electro,
Think we can get a breakdown of these presentation points, along with the actual times, when all is said and done?
-Lou