<div>Hello,</div><div> </div><div>> One thing I have been considering is to promote fields and global variables to local registers to reduce memory accesses.</div><div> </div><div><div>That would be great. But multithreaded code which assume (incorrectly) that those fields and globals are in memory may be broken.</div><div>Other languages don't allow to assume anything about such entities in multithreaded code.</div><div>From the other side, such languages do have a memory model which tells when a assignment result will become visible to other threads (if ever).</div><div> </div></div><div>> However, it would make multi-threaded code a bit trickier to write and demand the use of the "volatile" intrinsic on things like the conditions of while loops.</div><div> </div><div><div>Volatile (I assume you mean a C-like volatile) is usable in very rare special cases. Such as work with hardware buffers.</div><div> </div><div><div><div>In optimization sphere FPC can be improved in many ways. For example, expressions like: x + y * Ord(x > y)</div><div>FPC 3.0.4 does use IMUL instruction. But it can be compiled much more effective with cmov:</div><div>cmp     edi, esi</div><div>mov     eax, 0</div><div>cmovle  esi, eax</div><div>add     edi, esi</div><div>https://godbolt.org/z/Cf-AQE</div><div> </div><div>Don't know how hard is to implement such oiptimization though.</div></div></div></div><blockquote><div bgcolor="#FFFFFF"><p> </p></div></blockquote><div> </div><div>---</div><div>Best regards, George</div>