Skip to main content

Module benchmarks

Module benchmarks 

Source
Expand description

§Layer-filtering benchmarks

For a synthetic 1 GiB OASIS file with 1,036,400 paths, filtering during a Rust read took 2.691 s and 51.3 MiB peak RSS. Loading and then filtering in the same Rust implementation took 5.245 s and 3,211.0 MiB. Both retained 10,364 attributed paths. Increasing input size to 10 GiB with the same selected output gave 29.676 s and 50.4 MiB for filtering during read. These measurements compare two layouttk operations on a specified workload.

§Inputs

  • Public design. The IHP SG13G2 I/O library from OpenROAD-flow-scripts is 71,424,000 bytes. It contains 47 definitions and 22 roots, 1,113,991 polygons, one path, 1,226 texts and 78 references. Selecting 1/0 retains 268 polygons and 78 references. SHA-256 is 4281a855377b6a1ca46356e9391258dc14e8efc3b8051a65befc0fe9db3c7825. Pinned IHP file
  • Synthetic designs. Each OASIS PATH has 129 integer vertices, flush ends and a width of 4 DBU on a 1 nm grid. Each selected path carries a RUN property with the integer 42 and ASCII string mask. Each compressed block contains 100 paths with level-0 DEFLATE. The small dataset retains one path per block. The large dataset adds nine equally sized blocks of discarded paths for each original block. These are single-cell, repeated workloads without placements. Real designs can have different compression ratios, hierarchies and metadata.
DatasetInput bytesStored input elementsRetained elementsOutput OASIS bytes
IHP GDSII71,424,0001,115,2963468,174
Synthetic 1 GiB1,073,669,2391,036,40010,364150,175
Synthetic 10 GiB10,736,689,73510,364,00010,364150,175

§Results

Medians over three fresh processes per operation, with one sequential warmup read. Throughput uses on-disk input bytes. Measurements were made on November 28, 2026 on an Apple M4 Mac mini with 24 GiB unified memory, local APFS SSD, macOS 26.6.2, Rust 1.100.1 and a release build of the 0.1.0 development tree. The Python runs used CPython 3.11.15, maturin 1.16.0 and the installed arm64 wheel.

InputOperationSecondsMiB/sPeak RSS (MiB)
IHP GDSIIRust empty selection0.106640.42.0
IHP GDSIIRust filter during read0.107637.62.4
IHP GDSIIPython filter during read0.108632.025.7
IHP GDSIIRust filter and write OASIS0.107636.52.4
IHP GDSIIRust full read0.117583.6211.7
IHP GDSIIRust load then filter0.134507.7211.8
1 GiB OASISRust empty selection3.069333.72.5
1 GiB OASISRust filter during read2.691380.451.3
1 GiB OASISPython filter during read2.907352.374.1
1 GiB OASISRust filter and write OASIS3.136326.551.0
1 GiB OASISRust full read4.049252.93432.9
1 GiB OASISRust load then filter5.245195.23211.0
10 GiB OASISRust empty selection31.369326.42.4
10 GiB OASISRust filter during read29.676345.050.4
10 GiB OASISPython filter during read31.256327.671.0
10 GiB OASISRust filter and write OASIS33.435306.250.7

Read timing stops when the selected model is available. Conversion also times encoding, compression and replacement of the destination. RSS is the peak over the whole process, including serialization for later verification. The OS manages its file cache. Each decode used one worker. Full loading of the 10 GiB case was omitted on this machine. Its coordinates alone would take about 19.9 GiB and the configured retained-data budget was 4 GiB.

gdstk 1.0.2 checked polygon edges, reference targets, transforms and arrays in the IHP output. Its SHA-256 was 34d32a9d04cf45da662cd6e053ebee90fa1b9354ba746055b70e159da6a96950. Both synthetic outputs had SHA-256 f65bfef81e80bf5bc06d60df7a658d1f36393832f0d4c26876d740a00d09d4e6. The verifier checked all selected paths, coordinates, widths, layers and property values.

§Reproduce

On Linux or macOS, unpack the Python source distribution or use a source checkout. Install Rust, create a Python environment and run the commands below from the project root. Reserve at least 12 GiB of scratch space for a full run. Setup, input generation and independent verification are outside the timed operation. Each JSON line includes the raw time and RSS samples.

python3.11 -m venv .venv-bench
. .venv-bench/bin/activate
python -m pip install 'maturin==1.16.0' 'gdstk==1.0.2'
maturin build --release --locked --out /tmp/layouttk-bench-wheel
python -m pip install --no-deps --force-reinstall /tmp/layouttk-bench-wheel/layouttk-*.whl
python scripts/benchmark_layouts.py --rounds 3 > /tmp/layouttk-bench.jsonl

For a short validation run, use python scripts/benchmark_layouts.py --datasets 1x 10x --base-mib 2 --rounds 1. This scales down both datasets and verifies the result locally. Supply --public /path/to/sg13g2_io.gds to reuse a copy of the public input. Use the full sizes when comparing throughput or peak memory.

§Window clipping on one dense layer

A separate layouttk 0.2.0 experiment used KLayout to write a single-cell OASIS file containing 100,000 and 1,000,000 rectangles on layer 7/0. Rectangle number i spans (20i, 0) to (20i + 10, 10) on a 1 nm grid. Both inputs were clipped to 0,0,5,10. KLayout independently found a single output rectangle and empty XOR with the reference clip.

Rectangle countOASIS bytesTwo-pass elapsed timePeak process RSS
100,000148,4950.02 s3.80 MiB
1,000,0001,467,6070.21 s4.38 MiB

These are single measurements on an Apple M4 with the release CLI. Run layouttk --oas-budget-bytes 4096 clip source.oas output.oas --top TOP --layer 7/0 --window=0,0,5,10 on the two fixtures. The OASIS budget covers retained decoder data. RSS also includes decoder buffers, the process and the output. The experiment uses fixed small output from a flat synthetic source. For datasets with dense window overlap or large compact arrays, measure those workloads separately.