Page 5 of 10

Re: Coding Challenge 4!

Posted: September 24th, 2018, 2:53 am
by Slidy
Managed to double the speed, give or take.

Code: Select all

PASS (0ms) File Test: Buck Futter's Sexy Test 1
PASS (0.000464ms) 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 (0.000464ms) File Test: Buck Futter's Sexy Test 5
PASS (0ms) File Test: Buck Futter's Sexy Test 6
PASS (0.004174ms) File Test: Slidy's Test (10,000 nums)
PASS (0.031072ms) File Test: Slidy's Test (100,000 nums)
PASS (0.247188ms) File Test: Slidy's Test (800,000 nums)
PASS (3.51165ms) File Test: Slidy's Test (8,000,000 nums)
PASS (33.0082ms) File Test: NF Test
PASS (22.2562ms) File Test: NF Test 2

Re: Coding Challenge 4!

Posted: September 24th, 2018, 6:16 am
by Pindrought
Managed to save just a little more time off.

Pretty much stuck at this point though. Spawning 8 threads to do the processing. Numbers seem to vary a bit upon multiple tests but these are probably the best results I was able to achieve.
Image

Re: Coding Challenge 4!

Posted: September 24th, 2018, 8:33 am
by Slidy
A few minor edits + running without a debugger:

Code: Select all

PASS (0ms) File Test: Buck Futter's Sexy Test 1
PASS (0.000464ms) File Test: Buck Futter's Sexy Test 2
PASS (0.000464ms) 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 (0ms) File Test: Buck Futter's Sexy Test 6
PASS (0.002319ms) File Test: Slidy's Test (10,000 nums)
PASS (0.018087ms) File Test: Slidy's Test (100,000 nums)
PASS (0.145159ms) File Test: Slidy's Test (800,000 nums)
PASS (2.27895ms) File Test: Slidy's Test (8,000,000 nums)
PASS (14.4696ms) File Test: NF Test
PASS (11.9402ms) File Test: NF Test 2

Re: Coding Challenge 4!

Posted: September 24th, 2018, 9:31 am
by chili
It's a battle for the ages :D

Re: Coding Challenge 4!

Posted: September 24th, 2018, 1:43 pm
by AverageWhale
is multi threading allowed?

Re: Coding Challenge 4!

Posted: September 24th, 2018, 2:39 pm
by chili
yes

Re: Coding Challenge 4!

Posted: September 24th, 2018, 3:31 pm
by Pindrought
Slidy wrote:A few minor edits + running without a debugger:

Code: Select all

PASS (0ms) File Test: Buck Futter's Sexy Test 1
PASS (0.000464ms) File Test: Buck Futter's Sexy Test 2
PASS (0.000464ms) 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 (0ms) File Test: Buck Futter's Sexy Test 6
PASS (0.002319ms) File Test: Slidy's Test (10,000 nums)
PASS (0.018087ms) File Test: Slidy's Test (100,000 nums)
PASS (0.145159ms) File Test: Slidy's Test (800,000 nums)
PASS (2.27895ms) File Test: Slidy's Test (8,000,000 nums)
PASS (14.4696ms) File Test: NF Test
PASS (11.9402ms) File Test: NF Test 2
Nice man. Looks like you got me beat. I tried messing with my code but I think i'm capped out this time.

My final results (from my best test):
PASS (0.00ms) File Test: Buck Futter's Sexy Test 1
PASS (0.00ms) File Test: Buck Futter's Sexy Test 2
PASS (0.00ms) 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 (17.17ms) File Test: NF Test
PASS (15.00ms) File Test: NF Test 2
PASS (0.01ms) File Test: My Test

Re: Coding Challenge 4!

Posted: September 24th, 2018, 4:41 pm
by Yumtard
damn you chilly. im pretty sure i knoe exactly what kind of optimizations im supposed to do. but havent been able to get it to work

Re: Coding Challenge 4!

Posted: September 24th, 2018, 11:23 pm
by thesmallcreeper
Wanna share what I have achieved so far. This is a multithreading version (using 6 threads) running on my fx-8320@4ghz. hope the code doesnt have a "secret" bug :)

Code: Select all

PASS (12.92ms) File Test: NF Test
PASS (9.85ms) File Test: NF Test
PASS (6.76ms) File Test: NF Test 2
creating 6 threads costs me around 3 ms. :cry: Thats why 1st NF is slower:// (plz chili give us a pool :p)

also, should we care about the memory read bandwidth? NF has about 80m short values, this is about 160mb, so if you want to achieve a sub-10ms score you need at least 16GB/s read speed.

Re: Coding Challenge 4!

Posted: September 25th, 2018, 1:09 am
by chili
I mean, you're all running on the same hardware so it doesn't really matter. For the record, you got dual channel ddr3 1600.