Re: [fpc-devel] The "magic div" algorithm

2021-09-03 Thread Ched via fpc-devel
Very interesting, Gareth ! Is the div-by-7 related to 2 to the 3rd ? If yes, is it possible to design a div-by-3 with similar magics ? Cheers, Ched' Le 03.09.21 à 15:35, J. Gareth Moreton via fpc-devel a écrit : Hey Marģers, So I've been experimenting with your suggestion, and it looks

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Ched
s loosing popularity. But Python is not compiled and not suited for large programs (my own opinion). I rest with my favourite language : (Free)Pascal :) https://www.tiobe.com/tiobe-index/ https://pypl.github.io/PYPL.html?country=FR Cheers, Ched' ___

Re: [fpc-devel] Optimization for 'mod'

2018-01-06 Thread Ched
Hi, I haven't done the check if already implemented, but there are some interesting optimisations possible like: if a is a non-negative integer and t is a non-negative integer power of two, then a mod t can be translated at compile time to a and (t-1) Cheers, Ched' Le 05.01.2018 à

[fpc-devel] A question about CASE OF

2017-07-03 Thread Ched
are to be specified in first places. By tree, much faster for nearly same-probability items. Can the compiler manage the tree version or have I to hardcode a tree of cascaded IF THEN ELSE ? If so, how much levels can I develop in this cascade ? Cheers, Ched