Coding Challenge 4!

The Partridge Family were neither partridges nor a family. Discuss.
Slidy
Posts: 80
Joined: September 9th, 2017, 1:19 pm

Re: Coding Challenge 4!

Post by Slidy » September 24th, 2018, 2:53 am

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

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

Re: Coding Challenge 4!

Post by Pindrought » September 24th, 2018, 6:16 am

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

Slidy
Posts: 80
Joined: September 9th, 2017, 1:19 pm

Re: Coding Challenge 4!

Post by Slidy » September 24th, 2018, 8:33 am

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

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Coding Challenge 4!

Post by chili » September 24th, 2018, 9:31 am

It's a battle for the ages :D
Chili

AverageWhale
Posts: 57
Joined: August 13th, 2018, 2:33 pm

Re: Coding Challenge 4!

Post by AverageWhale » September 24th, 2018, 1:43 pm

is multi threading allowed?

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Coding Challenge 4!

Post by chili » September 24th, 2018, 2:39 pm

yes
Chili

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

Re: Coding Challenge 4!

Post by Pindrought » September 24th, 2018, 3:31 pm

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

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

Re: Coding Challenge 4!

Post by Yumtard » September 24th, 2018, 4:41 pm

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

thesmallcreeper
Posts: 14
Joined: September 24th, 2018, 1:20 pm

Re: Coding Challenge 4!

Post by thesmallcreeper » September 24th, 2018, 11:23 pm

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.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Coding Challenge 4!

Post by chili » September 25th, 2018, 1:09 am

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.
Chili

Post Reply