What is the point to change (int) 1000
to 1E3
?
And where does 1E3
come from?
I know just 3bytes
vs 4bytes
.
1E3 is notation for the mathematical expression 10^3 which is the same as 1000. If you wrote a million 1E6 would be 1000000 and then you would save two more bytes.
Minification is the process of minimizing code and markup in your web pages and script files. It's one of the main methods used to reduce load times and bandwidth usage on websites. Minification dramatically improves site speed and accessibility, directly translating into a better user experience.
How Minification Works. Minification works by analyzing and rewriting the text-based parts of a website to reduce its overall file size. Minification extends to scripts, style sheets, and other components that the web browser uses to render the site. Minification is performed on the web server before a response is sent ...
It is important to minify your CSS and minimise JavaScript files so they can load faster on your web pages. There are many reasons why you should minify your CSS and JavaScript: Reduce file size: The more code there is in a file, the larger it will be. Minified code is usually much smaller than the original version.
The whole point of minification is to be able to pass less data over the network but retain the same functionality.
Taken from wikipedia:
Minification (also minimisation or minimization), in computer programming languages and especially JavaScript, is the process of removing all unnecessary characters from source code without changing its functionality. These unnecessary characters usually include white space characters, new line characters, comments, and sometimes block delimiters, which are used to add readability to the code but are not required for it to execute.
As long as the size is smaller the minification is doing its job.
1E3
pretty much means 10 to the power of 3; a shorter way of representing the number 1000.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With