<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Oh, I just noticed you're replying to messages from a few days
ago. Oops!</p>
<p>There is no right way of going about optimisation. I'm of the
school that if you can give the compiler a helpful hint, without
complicating the code, then do it.</p>
<p>In one way I compare it to the id Tech (Quake) and Unreal engines
back in the 90s and early 2000s. When making maps, the id Tech
engines attempted to compile everything itself when it came to
determining what was visible and what it should cull - as a
result, the compilation process would take a long time and there
were some situations where it could easily fall apart due to
rounding errors or just some glitch in the tree. The Unreal
engine, on the other hand, had <i>you</i>, the map designer,
decide what was visible and what wasn't, and had you decide where
to place portals and other hints to the engine. This was useful
because it was much easier to subdivide areas if you were sensible
about it and hence the Unreal engine could handle much more
complex outdoor scenes, for example. The cost though, especially
with later versions of the Unreal engine that added more features,
is that it was very hard for a novice to get started - for
example, the 'terrain' feature didn't do any automatic visibility
culling, so if you had a large hill, for example, you would have
to insert an 'anti-portal' underneath it to give a hint to the
engine that if it is within the viewport, any polygons behind it
is invisible (which causes very weird artefacts if you place one
in the middle of an open room).</p>
<p>I like to take a middle ground, especially as the Pascal compiler
has a reputation of being fast. A smart compiler is a good
compiler, but expecting it to be able to know which procedures
should be auto-vectorised, especially with old source code and no
rules on memory alignment, it's either impossible or will take a
disproportinately long time. Other times it's an excuse for lazy
programming!</p>
<p>As for the vectorcall tests, they should vectorise the entire
argument on both x86_64-win64 and x86_64-linux. If not, there's a
bug somewhere. I'll have a look.<br>
</p>
<p>Gareth aka. Kit<br>
</p>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>