<div dir="ltr"><div dir="ltr">On Fri, Jan 19, 2024 at 4:44 PM H. S. Teoh via Digitalmars-d-learn <<a href="mailto:digitalmars-d-learn@puremagic.com">digitalmars-d-learn@puremagic.com</a>> wrote:</div><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">
Taking a look at this code:<br>
...</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Try addressing the points I wrote above and see if it makes a<br>
difference.<br><br></blockquote><div><br></div><div>I have tried it (all of it) even before you wrote it here, because I have completely the same ideas, but to be fair it has almost zero effect on speed.</div><div>There is my version (It still use OOP, but I have try it wit Printer and Counter to be structs and it has no effect at all) <a href="https://paste.ofcode.org/38vKWLS8DHRazpv6MTidRJY">https://paste.ofcode.org/38vKWLS8DHRazpv6MTidRJY</a></div><div><br></div><div>The only difference in speed in the end is caused by hash implementation of dlang associative arrays and rust HashMap, actually if you modify rust to not used ahash it has almost same speed as D</div></div></div>