Skip to content
markw65 edited this page May 2, 2023 · 2 revisions

Welcome to the monkeyc-optimizer wiki!

Source to Source Optimizer

When used as part of the @markw65/prettier-extension-monkeyc extension to vscode, the source to source optimizer writes out an optimized copy of your source files, then builds and optionally runs or exports the results. This is all done transparently. The optimized sources are written into the project's bin directory by default; your original project is unchanged.

Post build optimizer

The post build optimizer rewrites the bytecode after Garmin's compiler has built a .prg or .iq file. There are optimizations that can be done at the bytecode level that can't be done in source code. See details.

Font analyzer

Garmin provides .cft files for the simulator to use that match the fonts on each device, but the only documented way to get any information about these fonts is to run the simulator. The font analyzer is a command line tool that will tell you information about each font, such as font height, ascent, which characters are present, and what their widths are. See details.