{
  "topic_id": "soundfile-wave-local-hikaku",
  "request_id": "req-20261022-065",
  "started_at_utc": "2026-11-16T18:31:39.617845+00:00",
  "environment": {
    "platform": "macOS-27.2.1-arm64-64bit",
    "machine": "arm64",
    "python": "3.14.10 (main, Oct 25 2026, 17:12:00) [Clang 21.0.0 (clang-2100.3.34.2)]",
    "cpu": "Apple M4 Pro",
    "logical_cpus": 12,
    "versions": {
      "soundfile": "0.14.0",
      "numpy": "2.5.5",
      "libsndfile": "1.2.2",
      "wave": "CPython stdlib"
    },
    "soundfile_source": "pip install --target temporary directory (removed at exit)",
    "backend": "native CPU only; stdlib wave vs python-soundfile (libsndfile via cffi) + numpy; single thread; no audio device; no GPU"
  },
  "conditions": {
    "trials": 7,
    "warmup_batches": 1,
    "tool_order": "alternating per trial",
    "gc": "cyclic GC disabled during timed loop",
    "input": "synthetic (not speech) 16-bit PCM stereo WAV, 44100 Hz, 60 s, 2646000 frames; triangle tones 440/660 Hz + LCG noise; pcm sha256 e3e658c5e9f1f1d4d2b21706de6ae22b0a6470e060949f5e953c62ee451203f0",
    "timed": "loops calls per batch; each call opens the file, reads or writes all frames, closes it; results discarded; files live in a TemporaryDirectory on the local disk (OS page cache warm)",
    "not_timed": "sample generation, import, validation, hashing",
    "note": "wave read returns bytes while soundfile read returns an int16 ndarray; not identical return types"
  },
  "unit_map": {
    "trials[].elapsed_ns": "ns"
  },
  "input": {
    "frames": 2646000,
    "seconds": 60.0,
    "channels": 2,
    "sample_rate": 44100,
    "pcm_bytes": 10584000,
    "pcm_sha256": "e3e658c5e9f1f1d4d2b21706de6ae22b0a6470e060949f5e953c62ee451203f0",
    "file_bytes": 10584044
  },
  "ops": [
    {
      "op": "read-all",
      "loops_per_batch": 5,
      "description": "open WAV, read all frames (wave: bytes via readframes; soundfile: int16 ndarray via sf.read)"
    },
    {
      "op": "write-all",
      "loops_per_batch": 5,
      "description": "create WAV and write all frames (wave: writeframes(bytes); soundfile: sf.write(int16 ndarray, PCM_16))"
    }
  ],
  "cases": [
    {
      "op": "read-all",
      "wave_pcm_equals_input": true,
      "soundfile_pcm_equals_input": true,
      "soundfile_shape": [
        2646000,
        2
      ],
      "soundfile_dtype": "int16",
      "all_equal": true
    },
    {
      "op": "write-all",
      "wave_output_readback_identical_via_wave": true,
      "soundfile_output_readback_identical_via_wave": true,
      "wave_output_readback_identical_via_soundfile": true,
      "wave_output_file_bytes": 10584044,
      "soundfile_output_file_bytes": 10584044,
      "wave_output_file_sha256": "46bb0a8a317ba457cadeec3fef9142d3916d334f7d52259bde0ab1efa50d266a",
      "soundfile_output_file_sha256": "46bb0a8a317ba457cadeec3fef9142d3916d334f7d52259bde0ab1efa50d266a",
      "whole_files_byte_identical": true,
      "input_file_sha256": "46bb0a8a317ba457cadeec3fef9142d3916d334f7d52259bde0ab1efa50d266a"
    }
  ],
  "warmups": [
    {
      "op": "read-all",
      "tool": "wave",
      "loops": 5,
      "elapsed_ns": 3075666
    },
    {
      "op": "read-all",
      "tool": "soundfile",
      "loops": 5,
      "elapsed_ns": 2989083
    },
    {
      "op": "write-all",
      "tool": "wave",
      "loops": 5,
      "elapsed_ns": 9194500
    },
    {
      "op": "write-all",
      "tool": "soundfile",
      "loops": 5,
      "elapsed_ns": 11223542
    }
  ],
  "trials": [
    {
      "id": "read-all-wave-r1",
      "op": "read-all",
      "tool": "wave",
      "trial": 1,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 2994875
    },
    {
      "id": "read-all-soundfile-r1",
      "op": "read-all",
      "tool": "soundfile",
      "trial": 1,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 2804875
    },
    {
      "id": "read-all-soundfile-r2",
      "op": "read-all",
      "tool": "soundfile",
      "trial": 2,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 2478875
    },
    {
      "id": "read-all-wave-r2",
      "op": "read-all",
      "tool": "wave",
      "trial": 2,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 2420250
    },
    {
      "id": "read-all-wave-r3",
      "op": "read-all",
      "tool": "wave",
      "trial": 3,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 2299542
    },
    {
      "id": "read-all-soundfile-r3",
      "op": "read-all",
      "tool": "soundfile",
      "trial": 3,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 2475417
    },
    {
      "id": "read-all-soundfile-r4",
      "op": "read-all",
      "tool": "soundfile",
      "trial": 4,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 2728500
    },
    {
      "id": "read-all-wave-r4",
      "op": "read-all",
      "tool": "wave",
      "trial": 4,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 2321875
    },
    {
      "id": "read-all-wave-r5",
      "op": "read-all",
      "tool": "wave",
      "trial": 5,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 2185167
    },
    {
      "id": "read-all-soundfile-r5",
      "op": "read-all",
      "tool": "soundfile",
      "trial": 5,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 2756833
    },
    {
      "id": "read-all-soundfile-r6",
      "op": "read-all",
      "tool": "soundfile",
      "trial": 6,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 2800084
    },
    {
      "id": "read-all-wave-r6",
      "op": "read-all",
      "tool": "wave",
      "trial": 6,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 2508792
    },
    {
      "id": "read-all-wave-r7",
      "op": "read-all",
      "tool": "wave",
      "trial": 7,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 2240791
    },
    {
      "id": "read-all-soundfile-r7",
      "op": "read-all",
      "tool": "soundfile",
      "trial": 7,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 2504000
    },
    {
      "id": "write-all-wave-r1",
      "op": "write-all",
      "tool": "wave",
      "trial": 1,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 57674625
    },
    {
      "id": "write-all-soundfile-r1",
      "op": "write-all",
      "tool": "soundfile",
      "trial": 1,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 78663875
    },
    {
      "id": "write-all-soundfile-r2",
      "op": "write-all",
      "tool": "soundfile",
      "trial": 2,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 63773583
    },
    {
      "id": "write-all-wave-r2",
      "op": "write-all",
      "tool": "wave",
      "trial": 2,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 62694875
    },
    {
      "id": "write-all-wave-r3",
      "op": "write-all",
      "tool": "wave",
      "trial": 3,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 56663583
    },
    {
      "id": "write-all-soundfile-r3",
      "op": "write-all",
      "tool": "soundfile",
      "trial": 3,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 52050083
    },
    {
      "id": "write-all-soundfile-r4",
      "op": "write-all",
      "tool": "soundfile",
      "trial": 4,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 57362916
    },
    {
      "id": "write-all-wave-r4",
      "op": "write-all",
      "tool": "wave",
      "trial": 4,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 69106250
    },
    {
      "id": "write-all-wave-r5",
      "op": "write-all",
      "tool": "wave",
      "trial": 5,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 194528083
    },
    {
      "id": "write-all-soundfile-r5",
      "op": "write-all",
      "tool": "soundfile",
      "trial": 5,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 124565209
    },
    {
      "id": "write-all-soundfile-r6",
      "op": "write-all",
      "tool": "soundfile",
      "trial": 6,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 82675542
    },
    {
      "id": "write-all-wave-r6",
      "op": "write-all",
      "tool": "wave",
      "trial": 6,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 18418042
    },
    {
      "id": "write-all-wave-r7",
      "op": "write-all",
      "tool": "wave",
      "trial": 7,
      "order_position": 1,
      "loops": 5,
      "elapsed_ns": 12370416
    },
    {
      "id": "write-all-soundfile-r7",
      "op": "write-all",
      "tool": "soundfile",
      "trial": 7,
      "order_position": 2,
      "loops": 5,
      "elapsed_ns": 87566583
    }
  ],
  "summaries": [
    {
      "op": "read-all",
      "tool": "wave",
      "loops": 5,
      "median_batch_ns": 2321875,
      "min_batch_ns": 2185167,
      "max_batch_ns": 2994875
    },
    {
      "op": "read-all",
      "tool": "soundfile",
      "loops": 5,
      "median_batch_ns": 2728500,
      "min_batch_ns": 2475417,
      "max_batch_ns": 2804875
    },
    {
      "op": "write-all",
      "tool": "wave",
      "loops": 5,
      "median_batch_ns": 57674625,
      "min_batch_ns": 12370416,
      "max_batch_ns": 194528083
    },
    {
      "op": "write-all",
      "tool": "soundfile",
      "loops": 5,
      "median_batch_ns": 78663875,
      "min_batch_ns": 52050083,
      "max_batch_ns": 124565209
    }
  ],
  "finished_at_utc": "2026-11-16T18:31:42.391852+00:00"
}