<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Very quickly, Karatsuba's multiplication complexity of about n^1.6 <br>
soundly beats the usual elementary n^2 multiplication algorithm, even if <br>
Karatsuba is implemented in the image while the n^2 algorithm is a VM <br>
primitive.<br></blockquote><div><br></div><div>Here is an implementation of Karatsuba's multiplication, but it doesn't seem to work faster for big numbers, maybe I did something wrong:</div>f := 170 factorial.<br>[1000 timesRepeat: [f squared]] timeToRun. 5 <br><div>[1000 timesRepeat: [f karatsuba: f]] timeToRun. 161</div><div> </div></div></div>