Hacker News new | ask | show | jobs
by Someone 1950 days ago
Also, give fib(48) a try. Python will switch to bigint, but (https://github.com/gioblu/BIPLAN/blob/master/documentation/n...):

BIPLAN supports only one numeric variable type that is by default int32_t

So, fib(48) will overflow, and probably will return a negative number.

Preferring to give the right answer over giving an answer fast is one of the design decisions Python made.

There also is the unconventional choice to use a global array to store variables, leading to “BIPLAN supports a maximum amount of 116 global variables”. I don’t think changing that to make it growable will affect speed much, though.