Casting is a process where an object type is explicitly converted into another type if the conversion is allowed. This process might lead to a change in value.
Some algorithms have significant performance differences for different data-types, for example, calculating the N-dimensional median is much is much faster for integers than float type data. Therefore, the use of casting can be important for code performance.