index | Fast 2 | Fast 3

Code uses memory. Minimize usage. Started 5/1/2024.

Some programming languages are different but all have some form of memory management. Reuse as much as should be. Stuff like reusing a variable in Javascript to hold another type may in fact be faster. With that how to reuse in functions is key.

Kotlin and Java

Kotlin and Java have what is known as pass by reference with arrays, lists, and objects, actually reusing same memory, and pass by value, anything else like primitives which makes new memory when passing

Other programming languages

Passing in a variable to a function to use should help.

Note that there is a point at which it is faster and a point that this may be slower as per language.

Like an array of 1000 values to be used should be reused. 1 value, maybe consider just inside functions making it. It does depend on how much you are using but for large scale, reuse everything you can nearly. There is a cost to passing things to and from things.

X E.