[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-solaris
Subject:    Re: [kde-solaris] Re: fibonacci
From:       André_Schneider <Andre.Schneider () eas ! iis ! fraunhofer ! de>
Date:       2004-11-07 10:23:36
Message-ID: 418DF7A8.9090507 () eas ! iis ! fraunhofer ! de
[Download RAW message or body]

Hi all,

The calculation of elepsed time should be fixed as follwos
in the fibonacci program:


Stefan Teleman wrote:

> elapsed = ((double) (end / CLOCKS_PER_SEC) - (double) (start / CLOCKS_PER_SEC));

   elapsed = (end / (double)CLOCKS_PER_SEC) - (start / (double)CLOCKS_PER_SEC);


Currently I'm not in my office - so I can only test
GCC 3.3.3 on my Laptop. Results are interesting:


(Windows 2000, Cygwin, Pentium III Mobile, 1200 MHz)

gcc 3.3.3  (without optimization!!!)
fibonacci: calculated 10 fibonacci(36) in 6.319000 seconds
fibonacci: calculated 10 fibonacci(36) in 6.339000 seconds
fibonacci: calculated 10 fibonacci(36) in 6.329000 seconds

gcc 3.3.3 -O1
fibonacci: calculated 10 fibonacci(36) in 7.781000 seconds
fibonacci: calculated 10 fibonacci(36) in 7.791000 seconds
fibonacci: calculated 10 fibonacci(36) in 7.761000 seconds

gcc 3.3.3 -O2
fibonacci: calculated 10 fibonacci(36) in 7.370000 seconds
fibonacci: calculated 10 fibonacci(36) in 7.410000 seconds
fibonacci: calculated 10 fibonacci(36) in 7.420000 seconds

gcc 3.3.3 -O3
fibonacci: calculated 10 fibonacci(36) in 7.400000 seconds
fibonacci: calculated 10 fibonacci(36) in 7.430000 seconds
fibonacci: calculated 10 fibonacci(36) in 7.360000 seconds


/André


___________________________________________________
This message is from the kde-solaris mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde-solaris.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic