G-2220: Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values.
Minor
Efficiency
Reason
PLS_INTEGER
having a length of -2,147,483,648 to 2,147,483,647, on a 32bit system.
There are many reasons to use PLS_INTEGER
instead of NUMBER
:
PLS_INTEGER
uses less memoryPLS_INTEGER
uses machine arithmetic, which is up to three times faster than library arithmetic, which is used byNUMBER
.
Example (bad)
1 2 3 4 5 6 7 8 9 |
|
Example (good)
1 2 3 4 5 6 7 8 9 |
|