Can't wait to see what you came up with. I remember the last coding challenge I participated in I was pretty amazed by the speeds you achieved.chili wrote:@yum
Yeah, the base fast algo is very simple indeed, so it's highly possible that you missed nothing and just submitted the expected solution.
And I don't think you'll be disappointed by the optimizations
Coding Challenge 4!
-
- Posts: 432
- Joined: September 26th, 2013, 4:57 pm
- Location: Kentucky
- Contact:
Re: Coding Challenge 4!
PM me if you need to contact me. Thanks to all the helpful people on this forum especially to Chili.
Re: Coding Challenge 4!
Code: Select all
PASS (0.01ms) File Test: Buck Futter's Sexy Test 1
PASS (0.01ms) File Test: Buck Futter's Sexy Test 2
PASS (0.01ms) File Test: Buck Futter's Sexy Test 3
PASS (0.00ms) File Test: Buck Futter's Sexy Test 4
PASS (0.00ms) File Test: Buck Futter's Sexy Test 5
PASS (0.00ms) File Test: Buck Futter's Sexy Test 6
PASS (436.93ms) File Test: NF Test
PASS (359.87ms) File Test: NF Test 2
Last edited by colencon on September 23rd, 2018, 10:31 am, edited 1 time in total.
-
- Posts: 8
- Joined: September 22nd, 2018, 6:32 pm
- Location: United Kingdom
Re: Coding Challenge 4!
Well I updated my code and getFunnaly my algorithm actually runs faster on one core than 4, so all my knowledge of std::thread and std::async didn't help me in this challenge
Code: Select all
PASS (0.67ms) File Test: Buck Futter's Sexy Test 1
PASS (0.08ms) File Test: Buck Futter's Sexy Test 2
PASS (0.35ms) File Test: Buck Futter's Sexy Test 3
PASS (0.38ms) File Test: Buck Futter's Sexy Test 4
PASS (0.08ms) File Test: Buck Futter's Sexy Test 5
PASS (0.08ms) File Test: Buck Futter's Sexy Test 6
PASS (134.40ms) File Test: NF Test
PASS (138.44ms) File Test: NF Test
PASS (136.20ms) File Test: NF Test
PASS (106.63ms) File Test: NF Test 2
PASS (97.65ms) File Test: NF Test 2
PASS (94.29ms) File Test: NF Test 2
Re: Coding Challenge 4!
Here are my results:
I'm not sure if our results are comparable since we're all running on different machines.
As for the multithreading thing I got the same results. Doing this on a single thread with a good algo beat out a different approach with multiple threads.
Code: Select all
PASS (0ms) File Test: Buck Futter's Sexy Test 1
PASS (0.000928ms) File Test: Buck Futter's Sexy Test 2
PASS (0ms) File Test: Buck Futter's Sexy Test 3
PASS (0ms) File Test: Buck Futter's Sexy Test 4
PASS (0ms) File Test: Buck Futter's Sexy Test 5
PASS (0.000464ms) File Test: Buck Futter's Sexy Test 6
PASS (0.006492ms) File Test: Slidy's Test (10,000 nums)
PASS (0.064ms) File Test: Slidy's Test (100,000 nums)
PASS (0.509219ms) File Test: Slidy's Test (800,000 nums)
PASS (6.13659ms) File Test: Slidy's Test (8,000,000 nums)
PASS (53.0116ms) File Test: NF Test
PASS (42.382ms) File Test: NF Test 2
As for the multithreading thing I got the same results. Doing this on a single thread with a good algo beat out a different approach with multiple threads.
Re: Coding Challenge 4!
generating a 80M testfile takes like 10 minutes of proper cooking for me
Many noodles, one sauce.
'Programming rules: #1 - Everything is just a fucking number.' Chili, 2012
Mainly Discord procrastinator
'Programming rules: #1 - Everything is just a fucking number.' Chili, 2012
Mainly Discord procrastinator
Re: Coding Challenge 4!
Keep in mind, you might still pass if you're close to 1000ms, depending on your computer's speed relative to mine
Chili
Re: Coding Challenge 4!
i'm seeing a lot of people use threads in their programs but the challenge states that we can only use stdlib and the compiler stuff so, am i missing something or what?
Re: Coding Challenge 4!
std::thread
-
- Posts: 8
- Joined: September 22nd, 2018, 6:32 pm
- Location: United Kingdom
Re: Coding Challenge 4!
there is also std::async in <future> (witch I find from minor testing launches and closes faster)Yumtard wrote:std::thread
Re: Coding Challenge 4!
std::async uses thread pools in most impls, so it tends to be more agile.
Chili