Tibor's Musings

Python Exception Handling Overhead

In a previous blog post, I've estimated Python OO method call overhead to be about 10% over function calls. What about exception handling?

Here the situation differs. Exceptions are so pervasive in Python core language that handling exceptional cases of your code via adding more exceptions do not add much …

Python Memoisation

If the profiling shows that you call some function a lot of times for the same arguments, then memoise it. The canonical example is memoising the intermediate results of the Fibonacci recursive calculator, presented below. But beware: if you do memoise, better make sure that you don't eat up the …

Common Lisp Interpreted vs Compiled

Is there a difference between running interpreted and compiled Common Lisp code?

Your collaborators told you that:

I believe that the disappointment is largely related to the misunderstanding regarding Common LISP compilation method: Common LISP can NOT be executed interpreted - it is always compiled. [...] Accordingly, by proclaiming compilation of a …

Python Method Call Overhead

Python function calls are expensive. Python object oriented method calls are even more expensive. How can we estimate method call overhead?

By measuring performance of functional redefinition vs performance of class method calls.

One can find out that the overhead of using the OO method calls over functional calls seems …

Arthur Bolstein or Science Reporting in Popular Newspapers

When reading newspapers, are you choosing your sources well?

Years ago I happened to read an interview in a popular Slovak weekly magazine. The interview was with Arthur Bolčo aka Arthur Bolstein (an apparent wordplay on Albert Einstein) who claimed to have had mathematically proven the theory of relativity to …