<HTML>
P.S. The Wiki topic isn't just for the binary search proposal, and can easily be expanded for proposed and existing paradigms, and become an advanced programming guide. For example, I would be grateful for documentation on how the jump table system works.<br>
<br>
Gareth aka. Kit<br>
<br>
<span style="font-weight: bold;">On Sun 05/08/18 14:38 , "J. Gareth Moreton" gareth@moreton-family.com sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT:0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Hi everyone,<br>
<br>
<div>This one has been on my backburner for a while. I spent the last few days writing up some theory on the process, and feel this might be a good optimisation for case blocks whose branches call identically-structured functions, like in the peephole optimizer and the code formatter in Lazarus (it hashes individual words then sends it through a large case block, where a function then determines if it should be made bold or not).</div><div><br>
</div><div>I've written up my notes on the Wiki over here: <a href="http://wiki.freepascal.org/Case_Compiler_Optimization" target="_blank">http://wiki.freepascal.org/Case_Compiler_Optimization</a> - I hope it's explained clearly enough, including the requirements. At the moment I'm not personally working on it because I have to finish my work on pure functions. Still, how does the proposal look?<br>
<br>
When I do write it, the peephole optimizer will be my main test case, as it (currently) has 36 branches and I can test its speed and correctness relatively easily.<br>
<br>
Gareth aka. Kit<br>
</div>
_______________________________________________<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br>
<a target="_blank" href="<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a><br>
<br>
</blockquote></HTML>