Page 2 of 10

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 6:13 pm
by Pindrought
Yumtard wrote:Submitted a very simple algorithm (maybe too simple, might've missed something in the instructions)

looking forward to having my mind blown by your optimizations :)
What kind of times were you getting on a result set of 80 million?

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 6:40 pm
by NightFighter
Pindrought wrote:
Yumtard wrote:Submitted a very simple algorithm (maybe too simple, might've missed something in the instructions)

looking forward to having my mind blown by your optimizations :)
What kind of times were you getting on a result set of 80 million?
I made a multi-threaded attempt and got like 1000ms on attempt (it's a was a simple file though and a brute force method with no deductions)
you can test your's on it to my test file is at
https://drive.google.com/open?id=128pRk ... cgTYxiu0IE
it's not quite the 80 mil but it is close.
[Edit]
just realised I totally messed up my code and was running on one thread and need to correct my code xp

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 7:26 pm
by Pindrought
NightFighter wrote:
Pindrought wrote:
Yumtard wrote:Submitted a very simple algorithm (maybe too simple, might've missed something in the instructions)

looking forward to having my mind blown by your optimizations :)
What kind of times were you getting on a result set of 80 million?
I made a multi-threaded attempt and got like 1000ms on attempt (it's a was a simple file though and a brute force method with no deductions)
you can test your's on it to my test file is at
https://drive.google.com/open?id=128pRk ... cgTYxiu0IE
it's not quite the 80 mil but it is close.
[Edit]
just realised I totally messed up my code and was running on one thread and need to correct my code xp
How long did it take for the 80mil example to load into memory for you? I've been running it for a few mins and it still hasn't loaded all the data from the text file. :O

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 7:30 pm
by Yumtard
Jesus that's quite a text file.

ran it 3 times in release and got
145ms, 95ms, 91ms

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 7:52 pm
by Pindrought
Yumtard wrote:Jesus that's quite a text file.

ran it 3 times in release and got
145ms, 95ms, 91ms
Looks like I need to optimize my solution. :lol:

Those are some sick numbers Yumtard!

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 8:25 pm
by Yordrar
if we send multiple submits I suppose that you keep the last one right?

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 8:47 pm
by FinalL
last one only is counted

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 9:14 pm
by NightFighter
I fixed all my code and it didn't compleat in 24 mins so I have started from scratch and also I have another test for the people who got like 100ms https://drive.google.com/open?id=1DESiY ... HI38ot7CPL this test will check if you were doing what I was doing wrong (I was brute forcing with for loops but I used shorts in the loop which overflowed and underflowed and caused the code to go wrong (but it looked correct as the previous file was like the same 24 numbers repeated a ridiculous amount of times.

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 9:37 pm
by Pindrought
NightFighter wrote:I fixed all my code and it didn't compleat in 24 mins so I have started from scratch and also I have another test for the people who got like 100ms https://drive.google.com/open?id=1DESiY ... HI38ot7CPL this test will check if you were doing what I was doing wrong (I was brute forcing with for loops but I used shorts in the loop which overflowed and underflowed and caused the code to go wrong (but it looked correct as the previous file was like the same 24 numbers repeated a ridiculous amount of times.
For your latest test i'm getting somewhere around 240.68ms with my newest solution. Trying to figure out if there's anything else that I can optimize with what I currently know. :/

Current results:
Image

@Yumtard, what is your CPU?

I'm on a 4770k with the base clock speed.

Re: Coding Challenge 4!

Posted: September 22nd, 2018, 9:51 pm
by paulboon
i'm getting tons of error messages when opening the project
stuff like
cannot open source file "conio.h"
and
namespace "std" has no member "filesystem"

do i have some setting wrong in visual studio or am i using the wrong version of visual studio(using 2017)?