# Cygrid Performance Benchmark

> This benchmark evaluates the computational performance and scaling behavior of the cygrid gridding module. It measures processing time and parallelization efficiency across varying input sample sizes, field dimensions, and core counts. Use when the user has predictions and gold and needs to compute processing_time.

- Skill: `qhjqhj00/cygrid-performance-benchmark` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/cygrid-performance-benchmark`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/cygrid-performance-benchmark/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/cygrid-performance-benchmark

---


# cygrid-performance-benchmark

> Cygrid: A fast Cython-powered convolution-based gridding module for Python — Winkel et al. (2016) (arXiv:1604.06667, 2016)

## What this evaluates

This benchmark evaluates the computational performance and scaling behavior of the cygrid gridding module. It measures processing time and parallelization efficiency across varying input sample sizes, field dimensions, and core counts.

## Datasets

- **Synthetic Random Gridding Data** — total ?; splits: (unstated); repo https://github.com/bwinkel/cygrid

## Metrics

- `processing_time` **(primary)** — range: seconds
  - Wall-clock time in seconds required to grid n input samples to a target field of specified pixel size and kernel width.

## Input / output format

**Input**: Coordinate pairs (longitude, latitude) sampled from a uniform distribution, each assigned a signal value (Gaussian noise).

**Output**: Gridded target field map and the measured processing time in seconds.

## Scoring recipe

```python
import time
start = time.perf_counter()
result = cygrid.grid(data_coords, data_values, target_field)
elapsed = time.perf_counter() - start
return elapsed
```

## Common pitfalls

- Scaling is limited by memory bandwidth and cache performance rather than pure CPU bound operations.
- SciPy's griddata is not designed for gridding and may produce inaccurate results or fail on dense sampling/downsampling tasks.

## Evidence (verbatim from paper)

> We then use cygrid to grid the data and measure the necessary computing time. The result is displayed in Fig. 2 (top panel), which shows the processing times as a function of number of input samples for a field size of 5°×5°, a pixel size of 200″, and a Gaussian kernel width of ϑ_fwhm=300″. For comparison, we carried out the same gridding task using the scipy.interpolate.griddata function... The resulting runtimes are shown as black curves in Fig. 2.

## Citation

```bibtex
@misc{winkel2016cygrid,
  title={Cygrid: A fast Cython-powered convolution-based gridding module for Python},
  author={Winkel et al. (2016)},
  year={2016},
  note={arXiv:1604.06667}
}
```

- arXiv: 1604.06667

