According to Racket Docs, this is a syntax suger :
Increment (Appendix 1) and decrease (Subtraction 1) are somewhat common in programming. Using names for them is intended to make it easier for someone to read the code in order to immediately see which of the two operations is intended.
Performance: Using the built-in '+' is the best way to improve performance. ' General arithmetic operations ' (+, -, <,>, etc.) are built in by the JIT racket docs compiler :
The nested fixnum and flonum arithmetic operations are some of the most important advantages of the JIT compiler. For example, when + is applied to two arguments, the generated machine code checks to see if the two arguments are fixnums, and if so, it uses the machine instruction to add numbers (and check for overflow).
The performance difference is βso small that itβs hard to detect,β from the JIT compiler schema :
The JIT compiler works gradually as functions are applied, but the JIT compiler uses only limited use of runtime information when compiling procedures, because the code for a given module body or lambda abstraction is compiled only once. Glossality of JIT compilation is a single procedure body, not counting the body of any lexically nested procedures. The overhead for compiling JIT is usually so small that it is difficult to detect.
Some of the disadvantages of adding a definition to a global environment are : memory usage, namespace conflicts, increased GE service.
Some of the benefits of adding a definition to a global environment are : readability, ease of maintenance, reusable code.
source share