Coding Challenge 4!

The Partridge Family were neither partridges nor a family. Discuss.
Pindrought
Posts: 432
Joined: September 26th, 2013, 4:57 pm
Location: Kentucky
Contact:

Re: Coding Challenge 4!

Post by Pindrought » September 22nd, 2018, 6:13 pm

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?
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.

NightFighter
Posts: 8
Joined: September 22nd, 2018, 6:32 pm
Location: United Kingdom

Re: Coding Challenge 4!

Post by NightFighter » September 22nd, 2018, 6:40 pm

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

Pindrought
Posts: 432
Joined: September 26th, 2013, 4:57 pm
Location: Kentucky
Contact:

Re: Coding Challenge 4!

Post by Pindrought » September 22nd, 2018, 7:26 pm

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
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.

User avatar
Yumtard
Posts: 571
Joined: January 19th, 2017, 10:28 pm
Location: Idiot from northern Europe

Re: Coding Challenge 4!

Post by Yumtard » September 22nd, 2018, 7:30 pm

Jesus that's quite a text file.

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

Pindrought
Posts: 432
Joined: September 26th, 2013, 4:57 pm
Location: Kentucky
Contact:

Re: Coding Challenge 4!

Post by Pindrought » September 22nd, 2018, 7:52 pm

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!
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.

Yordrar
Posts: 2
Joined: September 22nd, 2018, 8:20 pm

Re: Coding Challenge 4!

Post by Yordrar » September 22nd, 2018, 8:25 pm

if we send multiple submits I suppose that you keep the last one right?
Last edited by Yordrar on September 22nd, 2018, 8:58 pm, edited 1 time in total.

FinalL
Posts: 53
Joined: February 6th, 2014, 3:44 pm
Location: Slovakia

Re: Coding Challenge 4!

Post by FinalL » September 22nd, 2018, 8:47 pm

last one only is counted
Many noodles, one sauce.
'Programming rules: #1 - Everything is just a fucking number.' Chili, 2012
Mainly Discord procrastinator

NightFighter
Posts: 8
Joined: September 22nd, 2018, 6:32 pm
Location: United Kingdom

Re: Coding Challenge 4!

Post by NightFighter » September 22nd, 2018, 9:14 pm

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.

Pindrought
Posts: 432
Joined: September 26th, 2013, 4:57 pm
Location: Kentucky
Contact:

Re: Coding Challenge 4!

Post by Pindrought » September 22nd, 2018, 9:37 pm

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.
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.

paulboon
Posts: 14
Joined: February 11th, 2017, 3:02 pm

Re: Coding Challenge 4!

Post by paulboon » September 22nd, 2018, 9:51 pm

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)?

Post Reply