Python: Do (explicit) string parameters hurt performance?
Suppose some function that always gets some parameter s that it does not use. def someFunc(s): # do something _not_ using s, for example a=1 now consider this call someFunc("the unused string") which gives a string as a parameter that is not built during runtime but compiled straight into the binary (hope thats right). The question is: when calling someFunc this way for, say, severalthousand times the reference to "the unused string" is always passed but does that slow the program down? in my naive thoughts i'd say the reference to "the unused string" is 'constant' and available in O(1) when a