# Performance Allocations

> Use Jeff Dean and Sanjay Ghemawat's canonical allocation guidance. Use when reducing heap traffic, copies, container growth, temporary construction, or repeated allocation in hot paths.

- Skill: `boshjerns/performance-allocations` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add boshjerns/performance-allocations`
- Raw SKILL.md: https://api.skillmd.com/api/skills/boshjerns/performance-allocations/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Marketing & Growth
- Author: boshjerns (https://skillmd.com/u/boshjerns)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/boshjerns/performance-allocations

---


# Reduce allocations

Read the exact current source section before applying it:

```bash
python3 ~/.codex/skills/performance-hints/scripts/fetch_section.py reduce-allocations --output text
```

Canonical section: [Reduce allocations](https://abseil.io/fast/hints#reduce-allocations)

Attribute the guidance to Jeff Dean and Sanjay Ghemawat. Do not assume every hint applies: inspect the code, identify the relevant cost, and measure or estimate before recommending a change.

This section includes:
- Avoid unnecessary allocations
- Resize or reserve containers
- Avoid copying when possible
- Reuse temporary objects


