View Single Post
Old Oct 9th, 2006, 10:27 AM   #12
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
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.
Arevos is offline   Reply With Quote