Page 1 of 1

cQuate VS eQuasian

Posted: Thu Nov 12, 2009 7:53 pm
by M_D_K
If you frequent the IRC channel, you'd know me and avansc have been having a kindof dual with eachother. Our weapons are equation solvers which we wrote ourselves. Avansc created cQuate and I made eQuasian. As you can probably tell avansc gave my solver its name(I was going to go with AsianKid but whatever). Anyway Round 1 finished and I got my ass kicked.

Here are the results for cQuate(mk2) VS eQuasian(mk1).

Code: Select all

avansc : 2+(4-3)*4 with 10000 iterations took : .017256 seconds
MDK : 2+(4-3)*4 with 10000 iterations took : .059301 seconds

avansc : 2+(4-3)*4 with 100000 iterations took : .146193 seconds
MDK : 2+(4-3)*4 with 100000 iterations took : .578857 seconds

avansc : 2+(4-3)*4 with 1000000 iterations took : 1.478141 seconds
MDK : 2+(4-3)*4 with 1000000 iterations took : 5.732433 seconds

---------------------------

avansc : (2+sin(3+4^-3)+5*sin(2))+34*10^-4 with 10000 iterations took : .060510 seconds
MDK : (2+sin(3+4^-3)+5*sin(2))+34*10^-4 with 10000 iterations took : .228746 seconds

avansc : (2+sin(3+4^-3)+5*sin(2))+34*10^-4 with 100000 iterations took : .557429 seconds
MDK : (2+sin(3+4^-3)+5*sin(2))+34*10^-4 with 100000 iterations took : 2.302950 seconds

avansc : (2+sin(3+4^-3)+5*sin(2))+34*10^-4 with 1000000 iterations took : 5.542729 seconds
MDK : (2+sin(3+4^-3)+5*sin(2))+34*10^-4 with 1000000 iterations took : 22.777084 seconds
cQuate: 1
eQuasian: 0
As you can see I have some catching up to do ;)

Re: cQuate VS eQuasian

Posted: Thu Nov 12, 2009 8:43 pm
by eatcomics
Nerds :P Just kidding, I think we need more of this stuff on the forums. Now get to work MDK

Re: cQuate VS eQuasian

Posted: Thu Nov 12, 2009 10:13 pm
by qpHalcy0n
Rename it "AsianKid" and see what kinda times you get ;]

Re: cQuate VS eQuasian

Posted: Fri Nov 13, 2009 6:08 pm
by RyanPridgeon
This is some intense shit right here.

We should have coding competitions or something on these boards :D

Re: cQuate VS eQuasian

Posted: Sun Nov 15, 2009 11:21 pm
by M_D_K
so qp ran both our code, and I fell behind again. But I know why when I cleaned up my source after. Unused functions and stuctures impacted on my speed, when I removed em I got a good 2s speed boost. So I'm gonna have qp take em out and re-profile, if my code beats avanc's it's 1 to me. But as it stands right now it's cQuate(MK2): 2 eQuasian(MK2): 0

Code: Select all

Cumulative Average per batch of 4 random equations of equal length.
All times in milliseconds (mSec) unless otherwise noted.

Test Machine: AMD PhenomII 920 x4, 4GB PC28500, Windows7 x64 Professional
Metered With: Microsoft Visual Studio Team System instrumented system profiler.

All tests are performed w/ release builds and *CODE OPTIMIZATION OFF!* to avoid sneak compiler optimizations.
Consistency verified by sampled profiler.


BATCH COUNT                     EXECUTION TIME
                       Avansc                    M_D_K
Small Equation 
---------
1000---->				4.2233    mSec		   6.283333 mSec
10000--->				566.8325  mSec			583.04   mSec
500000-->				29500.98  mSec			34326.19 mSec


Large Equation
---------
1000---->				17        mSec			30.9166   mSec
10000--->				2012.0233 mSec			2261.3433 mSec
500000-->				100232.48 mSec			113104.02 mSec
Btw the junk code in question was an indexer I wrote but never bothered to test or use since it wouldn't have worked with how I handle the equations.