Moved all docs from ./docs/ to ./web/documentation/ to be available on the website. No code changes. (0.40.5)
This commit is contained in:
parent
8f2847abfb
commit
567fa73796
224 changed files with 4584 additions and 1139 deletions
47
web/documentation/performance.md
Normal file
47
web/documentation/performance.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
---
|
||||
layout: page
|
||||
published: true
|
||||
noToc: true
|
||||
noComments: false
|
||||
noDate: false
|
||||
title: Fun - Performance Guide
|
||||
subtitle: Build/runtime tuning tips and patterns for better performance.
|
||||
description: Build/runtime tuning tips and patterns for better performance.
|
||||
permalink: /documentation/performance/
|
||||
lang: en
|
||||
tags:
|
||||
- documentation
|
||||
- handbook
|
||||
- installation
|
||||
- usage
|
||||
- introduction
|
||||
- help
|
||||
- guide
|
||||
- howto
|
||||
- docs
|
||||
- specifications
|
||||
- specs
|
||||
- repl
|
||||
---
|
||||
|
||||
# Performance Guide
|
||||
|
||||
Tips for getting good performance from Fun programs and builds.
|
||||
|
||||
## Build configuration
|
||||
- Use `-DCMAKE_BUILD_TYPE=Release` for production binaries.
|
||||
- Consider `FUN_DEBUG=OFF` to remove extra checks in hot paths.
|
||||
- `FUN_USE_MUSL=ON` can help with static/portable builds; measure performance for your use case.
|
||||
|
||||
## Language-level tips
|
||||
- Prefer pre-sized arrays/maps when possible to reduce reallocations.
|
||||
- Avoid unnecessary string concatenations in loops; accumulate in arrays and `join`.
|
||||
- Push work to native ops where available (e.g., regex, JSON, math helpers).
|
||||
|
||||
## Algorithmic choices
|
||||
- Choose appropriate data structures (arrays for ordered scans, maps for key lookups).
|
||||
- Cache repeated computations or lookups when safe.
|
||||
|
||||
## Measuring
|
||||
- Create small, representative benchmarks.
|
||||
- Compare Debug vs. Release to ensure changes are meaningful.
|
||||
Loading…
Add table
Add a link
Reference in a new issue