Skip to content

Commit 22dc222

Browse files
committed
Add some docs for emscripten-core#21084
1 parent 7e6366d commit 22dc222

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

site/source/docs/optimizing/Optimizing-Code.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44
Optimizing Code
55
===============
66

7-
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.
7+
Generally you should first compile and run your code without optimizations,
8+
which is the default when you just run ``emcc`` without specifying an
9+
optimization level. Such unoptimized builds contain some checks and assertions
10+
that can be very helpful in making sure that your code runs correctly. Once it
11+
does, it is highly recommended to optimize the builds that you ship, for
12+
several reasons: First, optimized builds are much smaller and faster, so they
13+
load quickly and run more smoothly, and second, **un**-optimized builds contain
14+
debug information such as the names of things and code comments in JavaScript
15+
(which may contain things you do not want to ship to your users).
16+
17+
The rest of this page explains how to optimize your code.
818

919
How to optimize code
1020
====================

0 commit comments

Comments
 (0)