![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 |
|
Programmer
Join Date: Feb 2005
Posts: 54
Rep Power: 4
![]() |
Why not profile the programs? Check out the profile module, it should give you plenty of info on how to measure the programs.
|
|
|
|
|
|
#22 |
|
Programming Guru
![]() |
yeah but the program is being run on the same machine so speed of processor is irrelevant if doing in copntrolled enviroment.
|
|
|
|
|
|
#23 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
The number of instructions would be calculated like this (I think):
variable = function("Something" + str(num))
^ ^ ^ ^
| | | | |
|
|
|
|
|
#24 |
|
Programming Guru
![]() |
ah but how many instructions does the function calls take?
|
|
|
|
|
|
#25 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I was just thinking that myself, actually. Shall we just say "who cares"?
|
|
|
|
|
|
#26 |
|
Programming Guru
![]() |
yeah but the problem with that is someone could write a custom function that takes less instructions then a library one but we cant tell :/
|
|
|
|
|
|
#27 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
True... how about "functions don't count"?
|
|
|
|
|
|
#28 |
|
Programmer
Join Date: Apr 2005
Posts: 73
Rep Power: 4
![]() |
Why not just number of non-whitespace characters?
x =""" code goes here """ print len([c for c in x if not c.isspace()]) # the lower the better. --OH. Last edited by hydroxide; Apr 26th, 2005 at 8:51 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|