![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 | |
|
Hobbyist Programmer
Join Date: Oct 2005
Posts: 211
Rep Power: 3
![]() |
Quote:
The various times of their execution might vary, but I doubt the govenor will phone for them at the last second anyway. -MBirchmeier |
|
|
|
|
|
|
#12 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
A language can have an affect on the order of a function, because functions often rely on functions built into the language, or part of a standard library. There's also issues with automatic optimisations leading to asynchronous efficiency gains.
However in practise its rare that a language will make any significant difference in that regard, especially with simple control structures such as while loops. I'd be very surprised indeed if the order of a C fibonacci program and a Python fibonacci program wasn't practically identical. Also, in this case the order is O(N) in Big O notation; it's a very simple algorithm, and unlikely to be affected significantly by language differences. There's no need to google "big-O complexity" for something like this; it's just overcomplicating things. |
|
|
|
|
|
#13 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
This is a strange thread, because the question is appropriate, but the OP should have broken some small amount of sweat on his own initiative, rather than merely looking for mama to break out the sugar tit.
Here are five search results. There's actually a reason that the forum's rules state that you should seach first. The reason is that I'm going to charge you lebenty-seven trillion dollars for doing it for you, when you could have done it as easily. Google awaits your bidding.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#14 | |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
Quote:
__________________
I looked it up on the Intergnats! |
|
|
|
|
|
|
#15 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
what i meant by the big-O for diff. languages is that i don't know what they're doing to achieve that, and it may be different..maybe not. don't see why it WOULD be different, but who knows.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#16 |
|
Expert Programmer
|
I think you can safely assume that any popular programming language will execute a while loop in linear time. You have a valid point, just a poor example.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 500 Ways to Print the Fibonacci Sequence | uman | Coder's Corner Lounge | 19 | Aug 25th, 2006 12:48 PM |
| fibonacci sequence | angry_asian | C++ | 12 | Aug 15th, 2006 2:53 AM |
| First Python Programme: Fibonacci Finder | UnKnown X | Python | 2 | Dec 15th, 2005 6:19 PM |
| Fibonacci | lingon | Python | 8 | Apr 29th, 2005 6:22 PM |
| Help - Execution Sequence | anandt4u | C++ | 23 | Apr 8th, 2005 3:46 PM |