[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Performance: C contra Ada







Michael Rasmussen <sslug@sslug> wrote on 03-03-2004 07:03:21:

> Det var også min første tanke:-) Senere er jeg kommet lidt i tvivl, og
> har overvejet, om det er compilerrelateret (g++). Jeg benytter typen long
> long i c++, da typen long i Java er identisk med long long i C++, så
> måske er det her, der kan findes en forskel?

> C++: http://tomcat.edu.brock.dk/dmu/csis3013/examples/fibonaci-c++.tar.gz

Jeg har kun skimmet koden men

=>long long doRec(long long n);

burde på 32-bit processorer køre hurtigere implementeret som:

void doRec_ref(const long long& n_ref_in, long long& retval_ref); // by ref
eller
void doRec_ptr(const long long* n_ptr_in, long long* retval_ptr); /* ptr by
val */

på 64-bit burde din version være hurtigere end ovenstående.

Med venlig hilsen

                                                                       
                                                                       
                                                                       
 Senior                                   IntraVision                  
 Developer                                                             
                                                                       
                                                                       
                                                                       
 Mail:          sslug@sslug        Lyngsø Alle 3,             
                                          2970 Hørsholm,             
                                          Denmark                      
                                                                       
 Direct:        +45 7023 2340             Office:        +45 7023 2340 
                                                                       
 Mobile:        +45 2613 9966             Fax:           +45 7023 2349 
                                                                       
                                          Web:           www.intravision.dk
                                                                       
                                                                       
                                                                       



This e-mail may contain confidential information and is intended only for
the addressee. If you have received this e-mail by mistake, please notify
the sender and delete this mail.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *