[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gambas-bugtracker] Bug #3221: using fast unsafe, when var is used in a loop and then printed after it is not optimized, can it be fixed
[Thread Prev] | [Thread Next]
- Subject: [Gambas-bugtracker] Bug #3221: using fast unsafe, when var is used in a loop and then printed after it is not optimized, can it be fixed
- From: <bugtracker@xxxxxxxxxxxxxx>
- Date: Sat, 10 Oct 2026 14:53:58 GMT
- To: brian@xxxxxxxxxxxxxxxx,bugtracker@xxxxxxxxxxxxxxxxxxxxxx
http://gambaswiki.org/bugtracker/edit?object=BUG.3221&from=L21haW4- Comment #2 by Benoît MINISINI: It seems so. I modified your 'withprint()' function so that the generated JIT code is exactly the same (except that we print 'i' at the end of the function). If the loop goes up to 922337236854775806 or 922337236854775807, then the 'withprint()' function hangs. If the loop goes up to 922337236854775805 or less, then 'withprint()' is as fast as 'Main()'. Go figure! Anyway I found a problem in the JIT compiled code, as the loop ends if the counter is strictly greater than the maximum. So if your maximum is the greatest value that can be encoded in the integer, the test is never TRUE, and the loop will never stop. Benoît MINISINI changed the state of the bug to: Upstream. ----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----