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
The release version of Tesseract.js is compiled with the O3 optimization level. The size and runtime impact of compiling at different optimization levels is shown below. Size refers to the size of the tesseract-core-simd.wasm.js file. Runtime refers to the runtime using the Tesseract.js Node benchmark (found in the main repo here). Lower optimizations levels that are not generally used for release versions are not included.
Optimization
Size
Runtime
O2
4.7 MB
53s
O3
4.8 MB
51s
Os
3.6 MB
70s
Oz
3.6 MB
71s
As the O2 vs. O3 results are nearly identical, as are the Os vs. Oz results, the only question is whether to prefer the smaller/slower builds or larger/faster builds. While the lower sizes produced by Os and Oz are appealing, the cost is steep--a ~39% increase in runtime. For most uses, the runtime increase will outweigh the 1 MB increase in size, so the O3 level is used for the release version. However, using a different optimization level may be desirable for certain use cases where recognition speed is anticipated to be very low and/or network speeds are anticipated to be very slow.
The text was updated successfully, but these errors were encountered:
The release version of Tesseract.js is compiled with the
O3
optimization level. The size and runtime impact of compiling at different optimization levels is shown below.Size
refers to the size of thetesseract-core-simd.wasm.js
file.Runtime
refers to the runtime using the Tesseract.js Node benchmark (found in the main repo here). Lower optimizations levels that are not generally used for release versions are not included.As the
O2
vs.O3
results are nearly identical, as are theOs
vs.Oz
results, the only question is whether to prefer the smaller/slower builds or larger/faster builds. While the lower sizes produced byOs
andOz
are appealing, the cost is steep--a ~39% increase in runtime. For most uses, the runtime increase will outweigh the 1 MB increase in size, so theO3
level is used for the release version. However, using a different optimization level may be desirable for certain use cases where recognition speed is anticipated to be very low and/or network speeds are anticipated to be very slow.The text was updated successfully, but these errors were encountered: