Register for your free account! | Forgot your password?

You last visited: Today at 14:15

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Release] Fastest MySql System [C#]

Reply
 
Old   #46
 
elite*gold: 0
Join Date: Oct 2009
Posts: 755
Received Thanks: 531
Quote:
Originally Posted by KraHen View Post
nooo way a recursive version is so much faster than that
EDIT: For KraHen's post:
Code:
int __Fib__(int a, int b, int c, int n)//private
{
    if(c == n) return a;
    return __Fib__(b, a+b, c+1, n);
}
int fib(int n)//public
{
    return __Fib__(0, 1, 0, n);
}

Code:
map<int, int> memo;
int lastFib = 0;
int fib(int n)
{
    if(lastFib == 0)
    {
        memo[0] = 0;
        memo[1] = 1;
        lastFib = 1;
    }
    if(memo[n] == 0 && n != 0)
        while(lastFib != n)
            memo[++lastFib] = memo[lastFib-1] + memo[lastFib-2];
    return memo[n];
}
Dynamic programming

Code:
int fib2(int n)
{
    if(n == 0 || n == 1) return n;
    return fib2(n-1) + fib2(n-2);
}
To calculate fib2(100) it takes about 3.5 seconds. To calculate fib(100) it takes less than 50 ms.



-impulse- is offline  
Old   #47
 
elite*gold: 0
Join Date: Apr 2006
Posts: 223
Received Thanks: 91
agreed, mysql and mssql functions are very similar in PHP.

[MySql]
mysql_connect, mysql_select_db, mysql_fetch_array, mysql_query

[MsSql]
mssql_connect, mssql_select_db, mssql_fetch_array, mssql_query

Etc, etc.


stealarcher is offline  
Old   #48
 
elite*gold: 0
Join Date: Feb 2011
Posts: 185
Received Thanks: 55
False alarm everyone, Fang will be back soon enough
Yup Stigs is offline  
Old   #49
 
elite*gold: 0
Join Date: Oct 2008
Posts: 36
Received Thanks: 10
He always release here something and deleted... Like a small kid. Go to ur mom...


stiwen is offline  
Thanks
1 User
Old   #50
 
elite*gold: 20
Join Date: Jul 2006
Posts: 1,917
Received Thanks: 659
@impulse - I was being sarcastic

MY LIFE IS ITERATIVE. LIVE WITH IT.
KraHen is offline  
Old   #51
 
elite*gold: 0
Join Date: Mar 2008
Posts: 308
Received Thanks: 203
Build your queries in ODBC syntax and use an ODBC driver for the database server of your choice.
MsSQL+ODBC is a good pair, and PHP has ODBC modules. You can write your web-side queries in PHP.ODBC syntax and switch data servers, anywhere from PostgresSQL to MsSQL. No need for a IIS host with aspx support.

You could switch to the ODBC syntax solely for the use of the MySQL ODBC driver to avoid the usage of a C# connector if you're so afraid of them.
.Ocularis is offline  
Old   #52
 
elite*gold: 0
Join Date: Apr 2006
Posts: 223
Received Thanks: 91
Or simply code a database class in PHP that supports either or with a switch of a single variable ^^, easier then it sounds.


stealarcher is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Mysql Login System erstellen
Hallo zusammen =) ich mal wieder xD da mein anderes problem mit dem Kontaktformular noch in Arbeit ist, komme ich schon einmal zu meinem...
9 Replies - Web Development
Vote System zeigt MySQL Error
Hey, für unseren 2.4.3 Armemu Server wollten wir ein VOte System einbauen.. Klappte alles wunderbar aber es kommt wenn man auf "Vote now" klickt ein...
1 Replies - WoW Private Server
[Release] MySQL Insert system
Ello! First of all, this is NOT sourcedependent, which means you can use this on any source without modifying the code. This is an replacement...
18 Replies - CO2 PServer Guides & Releases
[Help CoEmuV2 (PHP/MYSQL required)] Donation system
I want an system if someone donated it updates an other column so: Confirmation Code : put something here // Mysql table: Dragonballs.Dcode...
2 Replies - CO2 PServer - Discussions / Questions



All times are GMT +1. The time now is 14:15.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.