Migrating to Catalina Compiler: Step-by-Step Checklist

Catalina Compiler: Key Features and Performance Comparison

Overview

Catalina Compiler is a C compiler (also used in some contexts for small-device C development) by Ross Higson with an evolving set of releases and a published reference manual. It targets embedded and desktop builds and includes configurable plugins and memory/cache options for performance tuning.

Key features

  • Targeted platforms: Windows and various embedded targets (plugins for device interfaces).
  • Configurable memory/cache: Options like CACHED_1K/CACHED_64K, LUT_PAGE/LUT_CACHE and CACHE_PINS to tune cache behavior.
  • Floating-point plugins: Multiple FP plugin modes (e.g., Float_C) selectable to match target hardware.
  • Build modes: LARGE/SMALL builds to trade code size vs. speed.
  • Plugin system: Modular plugins for threads, SD card access, floating point and other platform I/O.
  • Command-line options: Rich flags (-g, -lthreads, -lm/-lma/-lmb/-lmc, -C for custom config) for debugging, optimization and platform selection.
  • Self-hosting capability: The compiler can be built with itself (used in performance benchmarking).
  • Documentation: A multi-page Reference Manual detailing options, internals and build examples.

Performance comparison (summary)

  • Compilation speed: Tunable options can change compile times; documented examples show ~10% compile-speed gains for LARGE-mode compiler builds when combining LUT_PAGE + CACHE_PINS + FLOAT_PINS.
  • Benchmark results (reported): With certain config flags, Catalina showed measured improvements on classic benchmarks (fibo, Dhrystone, Whetstone); typical gains cited: ~10% for larger programs, ~20% for small XMM programs under optimized cache/pin settings. Exact numbers depend on memory model, cache size, floating-point usage and chosen plugins.
  • Optimization tradeoffs: LARGE mode improves runtime performance at cost of binary size; SMALL reduces size but can be noticeably slower. Enabling aggressive cache/pin options helps compute-heavy workloads but may not benefit all programs.
  • Tuning sensitivity: Real-world performance varies by program; recommended to benchmark with your own code and try combinations of LUT_PAGE/LUT_CACHE, CACHE_PINS and FLOAT_PINS plus CACHED_sizes.

Practical tuning checklist

  1. Build in LARGE mode for performance-critical builds; SMALL for constrained memory.
  2. Try CACHED_64K (or best-fit cache size) then experiment with LUT_PAGE vs LUT_CACHE.
  3. Enable CACHE_PINS and FLOAT_PINS if hardware pins and plugins are available.
  4. Select appropriate floating-point plugin (-lm/-lma/-lmb/-lmc).
  5. Benchmark fibo/dhrystone/whetstone equivalents on your target to quantify changes.
  6. Use -g only for debugging builds (slower, larger). Avoid Quick Build when changing memory/plugin options.

Sources

  • Catalina releases and README (SourceForge)
  • Catalina Reference Manual (published PDF)

If you want, I can extract specific benchmark numbers from a chosen release (give me a preferred release version).

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *