cQuate VS eQuasian

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

cQuate VS eQuasian

Post 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 ;)
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: cQuate VS eQuasian

Post by eatcomics »

Nerds :P Just kidding, I think we need more of this stuff on the forums. Now get to work MDK
Image
qpHalcy0n
Respected Programmer
Respected Programmer
Posts: 387
Joined: Fri Dec 19, 2008 3:33 pm
Location: Dallas
Contact:

Re: cQuate VS eQuasian

Post by qpHalcy0n »

Rename it "AsianKid" and see what kinda times you get ;]
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: cQuate VS eQuasian

Post by RyanPridgeon »

This is some intense shit right here.

We should have coding competitions or something on these boards :D
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

Re: cQuate VS eQuasian

Post 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.
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
Post Reply