Wingo: Unboxing in Guile
Here is a longand detailed post from Andy Wingo on how he improved numericalperformance in the Guile language by carefully removing runtime typeinformation ("unboxing"). "If Guile did native compilation, it wouldalways be a win to unbox any integer operation, if only because you wouldavoid polymorphism or any other potential side exit. For bignums that arewithin the unboxable range, the considerations are similar to thefloating-point case: allocation costs dominate, so unboxing is almostalways a win, provided that you avoid double-boxing. Eliminating oneallocation can pay off a lot of instruction dispatch."