Numba Patterns

Community

Ensure fast, JIT-safe numeric routines

Authorlagarcess
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill codifies rules and best practices to ensure Numba JIT-compiled functions in src/argus/analysis are pure numeric, deterministic, and meet strict performance budgets so developers avoid hidden compilation costs and non-JIT-safe patterns that break benchmarks.

Core Features & Use Cases

  • JIT purity enforcement: Defines which operations are allowed inside @njit/@jit(nopython=True) functions and which Python objects, I/O, or libraries are forbidden.
  • Test warmup guidance: Requires calling warmup_jit() in test setup to separate compilation time from runtime benchmarks.
  • Performance targets & patterns: Specifies targets (e.g., ZigZag 1M <50ms post-warmup) and a wrapper pattern where lightweight Python wrappers convert raw JIT arrays into higher-level objects.
  • Use Case: Validate that pivot-finding and harmonic pattern scans meet microsecond/millisecond budgets in CI benchmarks without including compilation overhead.

Quick Start

Run the Numba Patterns guidance to check that all @njit functions in src/argus/analysis are pure-math, that tests call warmup_jit() before timing, and that wrapper functions convert raw arrays into Python objects.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Numba Patterns
Download link: https://github.com/lagarcess/argus/archive/main.zip#numba-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.