Skip to content

Commit

Permalink
Add some docs for emscripten-core#21084
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed Jan 23, 2024
1 parent 7e6366d commit 22dc222
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion site/source/docs/optimizing/Optimizing-Code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
Optimizing Code
===============

Generally you should first compile and run your code without optimizations (the default). Once you are sure that the code runs correctly, you can use the techniques in this article to make it load and run faster.
Generally you should first compile and run your code without optimizations,
which is the default when you just run ``emcc`` without specifying an
optimization level. Such unoptimized builds contain some checks and assertions
that can be very helpful in making sure that your code runs correctly. Once it
does, it is highly recommended to optimize the builds that you ship, for
several reasons: First, optimized builds are much smaller and faster, so they
load quickly and run more smoothly, and second, **un**-optimized builds contain
debug information such as the names of things and code comments in JavaScript
(which may contain things you do not want to ship to your users).

The rest of this page explains how to optimize your code.

How to optimize code
====================
Expand Down

0 comments on commit 22dc222

Please sign in to comment.