A couple weeks ago I was reading a thread about character counting and Vegaseat made the comment that
Function calls are time expensive in Python, so I modified Sneekula's count_char2() approach by replacing all those calls to islower(), isupper(), isdigit() and isspace(), and also changing the order of if/elif to use the most common character test first.
I was intrigued, but I wanted to start a new thread because it seems like a new topic of discussion.
I was wondering if someone could expand a bit more on that statement. Why are function calls expensive in python, and is it more so than in other languages?