Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Optimized the op-assign operators (such as: +=, *=, /=)
Example: var x = [1,2,3]; x[1] += 1; # does only one array lookup say x; # prints: [1,3,3] In addition, we can now chain multiple op-assign operators: var x = 42; x -= 1 *= 2 say x; # prints: 82 (41 * 2) - Using the same trick, var-mutable methods are also much faster: var x = [1,2,3]; x[1].sqrt! # does only one array lookup say x; # prints: [1, 1.414213, 3]
- Loading branch information