[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Performance problem with table.move
- From: "Jasper Klein" <jasper@...>
- Date: Sun, 06 Dec 2020 15:03:12 +0100
Op Sun, 06 Dec 2020 13:28:46 +0100 schreef Ranier Vilela <firstname.lastname@example.org>:
Em sáb., 5 de dez. de 2020 às 23:18, Andrew Gierth <
Using unsigned rather than signed integers is sometimes detrimental to
performance and essentially never beneficial; the reason is that the
compiler is allowed to do some optimizations with signed values that are
not allowed on unsigned ones.
This contradicts everything I've studied about optimizations.
For loops, the quickest option, are variables with the natural size of the
What in 64 bits means 8 bytes, int in 64 bits is 32 bits.
Which leads the compiler to make implicit conversions to use the variables
that index the arrays in Lua,
that today, all are 32 bits.
In addition, it is not possible to create the largest possible table that
fits in "unsigned int".
Maybe this part of a talk by Chandler Carruth is interesting for you.