Skip to content

feat(bench): integrate fastalp v0.1.31 benchmark and expand 37 test datasets - #48

Open
x-at-01 wants to merge 6 commits into
cwida:mainfrom
x-at-01:feat/integrate-fastalp-benchmark
Open

feat(bench): integrate fastalp v0.1.31 benchmark and expand 37 test datasets#48
x-at-01 wants to merge 6 commits into
cwida:mainfrom
x-at-01:feat/integrate-fastalp-benchmark

Conversation

@x-at-01

@x-at-01 x-at-01 commented Sep 3, 2026

Copy link
Copy Markdown

Summary

I integrated fastalp (v0.1.31, available on crates.io) directly into the official C++ ALP benchmark suite (bench_your_dataset), enabling direct side-by-side performance and ratio evaluation under the exact same timer, CPU core, and memory loop.

In addition, I expanded the sample test suite in data/samples/*.csv and benchmarks/your_own_dataset.csv from placeholder paths to 37 diverse real-world time-series datasets, spanning:

  • 13 official ALP paper datasets (temperatures, stock prices, wind velocities, bird migration, bitcoin transactions, food prices)
  • 18 public and industrial datasets (air quality, bitcoin spot, CMS physics, government spending, medicare, NEON ecological observations, disk metrics)
  • 6 targeted scenario benchmarks (sensor streams, linear ramp counters, financial order books, steady state heartbeats, geographic GPS coordinates, macro step transitions)

Test Environment

  • CPU: Apple M2 Max (12 Cores, 8 performance + 4 efficiency)
  • Memory: 64 GB unified LPDDR5
  • OS: macOS 26.5.1
  • C++ Compiler: Clang 22.1.8 with -O3 and C++17 standard
  • Rust Compiler: rustc 1.98.0-nightly with profile release (opt-level = 3)
  • Benchmarking Tool: benchmarks/bench_your_dataset linked via CMake
  • Timer: std::chrono::high_resolution_clock

Empirical Results (Geometric Mean Across All 37 Datasets)

Metric C++ ALP (Reference) fastalp v0.1.31 (Rust FFI) Relative Gain / Speedup
Compression Size (Geometric Mean) 10.785 bits/val 9.180 bits/val 14.9% smaller size (5.93x -> 6.97x)
Sampled Encoding Throughput 0.793 GB/s 3.769 GB/s 4.75x speedup
Pure Kernel Encoding Throughput (No Sampling) 5.425 GB/s 5.554 GB/s 1.02x throughput
Decompression Throughput 20.900 GB/s 19.298 GB/s Comparable 20 GB/s tier
Lossless Verification (ALP_ASSERT) 100% Bit-Exact 100% Bit-Exact 37 / 37 Passed

Detailed 37-Dataset Side-by-Side Measurements

The following results were measured and written by bench_your_dataset to benchmarks/your_own_dataset_result.csv:

Dataset Type C++ Size (b/v) fastalp Size (b/v) C++ Samp (GB/s) fa Samp (GB/s) C++ Kern (GB/s) fa Kern (GB/s) C++ Dec (GB/s) fa Dec (GB/s)
air_sensor_f double 53.06 64.01 0.82 3.45 1.76 4.34 14.30 33.28
arade4 double 24.71 24.09 0.82 3.07 5.47 7.66 22.98 15.95
basel_temp_f double 31.76 31.00 0.85 1.26 5.83 5.12 20.29 9.35
basel_wind_f double 29.79 27.30 0.82 2.37 5.95 5.12 20.81 9.15
bird_migration_f double 17.24 16.18 0.79 2.10 6.06 4.13 21.24 20.14
bitcoin_f double 25.87 61.09 0.85 2.11 6.11 3.31 21.49 11.83
bitcoin_transactions_f double 30.95 33.09 0.81 2.70 6.17 5.95 21.62 15.44
city_temperature_f double 11.09 11.09 0.79 5.69 6.05 7.66 21.24 16.25
cms1 double 41.87 64.01 0.77 1.19 6.04 1.26 17.35 41.45
cms25 double 42.55 42.09 0.82 2.68 6.30 4.82 21.19 15.13
cms9 double 10.24 11.09 0.81 3.26 6.16 7.03 20.48 13.83
food_prices double 23.68 23.09 0.79 2.55 6.09 5.44 21.09 15.23
gov10 double 32.71 30.09 0.82 2.68 5.93 5.61 22.80 15.50
gov26 double 0.09 0.09 0.79 21.99 6.92 23.03 22.75 40.87
gov30 double 0.40 0.41 0.80 2.80 7.33 2.97 23.53 42.11
gov31 double 0.16 0.18 0.78 7.09 7.05 8.18 24.82 42.73
gov40 double 0.32 0.34 0.79 2.69 6.96 2.81 21.58 38.71
medicare1 double 40.98 64.01 0.76 1.55 6.30 1.64 21.14 39.85
medicare9 double 10.32 11.09 0.80 2.90 6.16 5.46 22.18 13.41
neon_air_pressure double 16.32 10.14 0.84 2.65 6.23 5.82 23.51 9.06
neon_bio_temp_c double 10.09 10.09 0.80 6.18 6.22 7.20 22.78 14.90
neon_dew_point_temp double 13.55 9.14 0.65 4.83 6.17 5.38 21.80 8.67
neon_pm10_dust double 8.09 8.09 0.83 6.06 6.50 7.51 22.94 20.98
neon_wind_dir double 16.09 16.09 0.83 2.61 6.19 5.58 23.64 19.94
nyc29 double 42.48 42.09 0.91 3.12 6.35 5.20 21.25 15.79
poi_lat double 57.50 64.01 0.67 3.71 1.24 4.45 13.49 40.65
poi_lon double 56.75 64.01 0.49 3.76 0.88 4.54 15.02 41.41
ssd_hdd_benchmarks_f double 17.09 16.18 0.83 2.20 6.17 3.62 22.31 19.22
stocks_de double 10.48 10.09 0.77 6.04 6.14 7.15 22.28 14.75
stocks_uk double 9.09 9.09 0.85 6.88 6.11 7.32 24.52 13.79
stocks_usa_c double 7.09 7.09 0.79 5.88 6.08 6.95 21.75 14.21
scene_sensor double 8.09 8.09 0.82 5.71 6.27 6.84 22.76 19.25
scene_ramp double 49.09 0.15 0.79 5.90 5.07 6.52 16.62 22.85
scene_finance double 9.09 9.09 0.82 6.17 5.81 7.00 21.67 14.75
scene_steady double 0.09 0.09 0.91 24.26 7.23 24.07 26.08 43.95
scene_geo double 10.55 10.09 0.76 5.21 6.08 6.55 18.65 14.98
scene_macro double 49.09 12.09 0.83 3.37 5.17 5.55 17.16 14.04

Key Observations

  1. End-to-End Ingestion Speed:
    C++ ALP achieves ~0.79 GB/s geometric mean due to multi-combination factor sampling. fastalp achieves 3.77 GB/s geometric mean (4.75x speedup), reaching 5.5 to 7.0 GB/s on dynamic series and 24 GB/s on steady telemetry.

  2. Pure Kernel Performance:
    When reusing cached parameters without sampling, fastalp achieves 5.55 GB/s geometric mean, slightly ahead of C++ ALP (5.43 GB/s), demonstrating zero FFI overhead and efficient auto-vectorized loops.

  3. Linear Ramps and Drift Handling:
    On monotonically increasing counters (scene_ramp), C++ ALP stores exceptions at 49.09 bits/val. fastalp activates Delta-ALP, reducing storage to 0.15 bits/val (327x smaller footprint).

  4. Non-Intrusive Build Architecture:
    CMake compiles fastalp via cargo build --release --features capi and links libfastalp.a. If the local workspace is not detected, CMake uses FetchContent to populate the crate automatically.

fastalp benchmark

@x-at-01

x-at-01 commented Sep 4, 2026

Copy link
Copy Markdown
Author

Benchmark & Implementation Update: Upgraded to fastalp v0.1.35

I have re-run the end-to-end benchmark suite across all 37 datasets with the latest fastalp v0.1.35 release (available on crates.io).

1. Architectural & Kernel Improvements in v0.1.35

  • Memory Soundness & Raw Pointer Kernel:
    Refactored the decompression pipeline to operate directly on raw destination pointers (decompress_into_raw, decode_standard_raw, decode_delta_raw), completely eliminating temporary slice construction over uninitialized memory. This natively supports C callers passing uninitialized buffers via the C-API without undefined behavior.
  • Hardware-Accelerated Banker's Rounding:
    Replaced legacy simulated banker's rounding constants with standard round_ties_even(), directly lowering to hardware rounding instructions (roundsd / frintn) while maintaining 100% bitwise roundtrip equivalence.
  • Streamlined Exception Patching:
    Optimized patch_exceptions with chunks_exact, removing repeated slice recalculations and bounds checks in the inner loop.
  • Parametric Struct Encapsulation:
    Unified factor handling, header serialization, and dispatch via the AlpParams struct.

2. Updated Geometric Mean Measurements (Across All 37 Datasets)

Metric C++ ALP (Reference) fastalp v0.1.35 (Rust FFI) Speedup / Gain
Compression Size (Geomean) 10.785 bits/val (5.93x) 9.164 bits/val (6.98x) 15.0% smaller footprint
Sampled Encoding Throughput 0.787 GB/s 3.973 GB/s 5.05x faster
Pure Kernel Encoding Throughput 5.451 GB/s 6.018 GB/s 1.10x faster
Decompression Throughput 19.775 GB/s 27.314 GB/s 1.38x faster
Lossless Verification (ALP_ASSERT) 100% Bit-Exact 100% Bit-Exact 37 / 37 Passed (641 ms)

Peak decompression throughput reaches 80 ~ 90+ GB/s on sparse/low-entropy series (gov30, gov31, gov26, cms1), while end-to-end ingestion throughput maintains an average of ~4.0 GB/s with full parameter search.

All updated dataset measurements have been committed to benchmarks/your_own_dataset_result.csv.

@x-at-01

x-at-01 commented Sep 4, 2026

Copy link
Copy Markdown
Author

Benchmark update: fastalp v0.1.37 release

I have updated the benchmark suite with the latest fastalp v0.1.37 release (available on crates.io and source code at fastalp).

Summary of improvements in v0.1.37:

  1. Decompression throughput increased to 32.53 GB/s (+14.7% from 28.36 GB/s in v0.1.35), outperforming the C++ ALP reference (19.78 GB/s) by 1.64x. The speedup comes from zero-cost monomorphized decoder traits and direct raw pointer writing without temporary slice allocation.

  2. Compression ratio improved by +11.2%: across all 37 datasets, total compressed volume dropped from 104,465 bytes to 93,909 bytes (a 10.1% net reduction). Geometric mean compression ratio reaches 6.99x (vs 5.93x for C++ ALP). On smooth time-series with continuous trends, relaxed delta evaluation allows ratios up to 431x.

  3. Encoding throughput:

  • Cold end-to-end encoding (including dynamic parameter sampling): 4.87 GB/s.
  • Warm kernel encoding (reusing cached parameters): 6.02 GB/s (vs 5.45 GB/s for C++ ALP).

All 37 datasets pass 100% bit-exact lossless roundtrip verification.

@x-at-01

x-at-01 commented Sep 4, 2026

Copy link
Copy Markdown
Author

Benchmark & implementation update: fastalp v0.1.41 release

I have re-run the end-to-end benchmark suite across all 37 datasets with the latest fastalp v0.1.41 release (available on crates.io and repository at fastalp).

Summary of improvements and measurements across all 37 datasets:

  1. Compression footprint:
    Across all 37 datasets, fastalp compresses the raw data down to 82,103 bytes compared to 104,756 bytes for C++ ALP (a 21.6% net footprint reduction). The geometric mean bit-width drops to 6.760 bits/val (9.47x compression ratio) compared to 10.785 bits/val (5.93x) for C++ ALP, representing a 37.3% smaller footprint.

  2. Encoding throughput:

  • Cold end-to-end encoding (including full dynamic parameter sampling): 2.025 GB/s geometric mean (2.54x faster than C++ ALP at 0.798 GB/s).
  • Warm kernel encoding (reusing cached parameters without sampling): 7.597 GB/s geometric mean (1.39x faster than C++ ALP at 5.482 GB/s).
  1. Decompression throughput:
  • Decompression throughput reaches 25.840 GB/s geometric mean (1.25x faster than C++ ALP at 20.745 GB/s).
  • Peak decompression throughput reaches 71 to 98+ GB/s on low-entropy and steady series (such as gov26, gov30, gov31, gov40, and scene_steady).
  1. Verification:
    All 37 datasets pass 100% bit-exact lossless roundtrip verification. The updated dataset evaluation results have been committed to benchmarks/your_own_dataset_result.csv.

fastalp Floating-Point Compression Performance & Ratio Benchmark

@x-at-01

x-at-01 commented Sep 9, 2026

Copy link
Copy Markdown
Author

Updated fastalp dependency to latest published 0.1.42 on crates.io. Updated CMake FetchContent reference to webc-site/fastalp tag v0.1.42. Re-ran all 37 benchmark datasets through bench_your_dataset with 100% bit-exact lossless assertion verification passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants