You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/source/docs/optimizing/Optimizing-Code.rst
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,18 @@
4
4
Optimizing Code
5
5
===============
6
6
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 files and functions, code comments in
15
+
JavaScript, etc. (which aside from increasing size may also contain things you
16
+
do not want to ship to your users).
17
+
18
+
The rest of this page explains how to optimize your code.
0 commit comments