<HTML>
<div><style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>Compilers are one of those programs that fall under a very special, very exclusive set of projects where a lot of the standard rules may not apply, but if they can be followed where possible, brilliant.</div><div><br>
</div><div>Sometimes, increasing complexity and maintainability in the name of speed is not a solution, as I found out with my binary search implementation. However, a way around that is to see if we can program such a feature into the compiler itself if it detects it can gain a speed boost from it (in this situation, a case block with 36 values to choose from, but where each branch calls an identically-structured procedure... some of the values call the same routine, but otherwise the routines have the same parameters and return types).<br>
</div><div><br>
</div><div>If you can find a way to fix a memory leak without sacrificing performance too significantly, by all means submit a patch for review.</div><div><br>
</div><div>If I had my way, if I wanted to make the compiler as fast as possible, I'd just drop into assembly language for the most critical parts, but that's a big no-no in this particular project, not because of how hard it is to maintain, debug and explain, but because of cross compilation issues. You should be able to create a compiler that targets any platform of your choice. I think the only time you can use assembly language is with some of the internal compiler routines like the Frac function.<br>
</div><div><br>
</div><div>Gareth aka. Kit<br>
</div> <br>
<br>
<span style="font-weight: bold;">On Mon 30/07/18 17:42 , "Marcos Douglas B. Santos" md@delfire.net sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">On Mon, Jul 30, 2018 at 12:29 PM, R0b0t1 <<a href="mailto:r030t1@gmail.com">r030t1@gmail.com</a>> wrote:
<br>
<span style="color: rgb(102, 102, 102);">> On Mon, Jul 30, 2018 at 7:32 AM, Martok <<a href="mailto:listbox@martoks-place.de">listbox@martoks-place.de</a>> wrote:
</span><br>
<span style="color: rgb(102, 102, 102);">>> Am 30.07.2018 um 14:24 schrieb Marcos Douglas B. Santos:
</span><br>
<span style="color: rgb(102, 102, 102);">>>> Is performance more important than being correct? :|
</span><br>
<span style="color: rgb(102, 102, 102);">>> In this project, the answer is always taken to be yes.
</span><br>
<span style="color: rgb(102, 102, 102);">>>
</span><br>
<span style="color: rgb(102, 102, 102);">>
</span><br>
<span style="color: rgb(102, 102, 102);">> To hopefully offer some explanation for Mr. Santos - if I can compile
</span><br>
<span style="color: rgb(102, 102, 102);">> and run the program 5 times over the course of 20 minutes, that is
</span><br>
<span style="color: rgb(102, 102, 102);">> certainly better than running it and testing it once over the same
</span><br>
<span style="color: rgb(102, 102, 102);">> amount of time, no?
</span><br>
<span style="color: rgb(102, 102, 102);">>
</span><br>
<span style="color: rgb(102, 102, 102);">> It might be hard to imagine FPC taking that much longer than it does
</span><br>
<span style="color: rgb(102, 102, 102);">> currently but ~30min for a large program is the standard with other
</span><br>
<span style="color: rgb(102, 102, 102);">> compilers. I very much enjoy the speed of FPC.
</span><br>
<br>
All us like fast compiling...
<br>
However, IMHO, a compiler should use the same good practices that
<br>
others programs must use.
<br>
If it cannot use them because it's very slow, what is the matter about
<br>
good practices?
<br>
<br>
"Do what I'm telling you to do, but don't do what I do" ? :)
<br>
<br>
best regards,
<br>
Marcos Douglas
<br>
_______________________________________________
<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>
<br>
</blockquote></HTML>