Skip to content

Releases

v0.2.0

Choose a tag to compare

@nedpark nedpark released this 14 Nov 08:18
d0c8d32

Added

  • Swift Package Index (.spi.yml) configuration for hosted DocC documentation (documentation_targets: [Bandal]).
  • Multi-platform deployment support in Package.swift (.macOS(.v14), .iOS(.v17), .tvOS(.v17), .visionOS(.v1)).
  • Comprehensive DocC documentation comments (///, - Parameters:, - Returns:, - Throws:) across all Bandal, BandalBenchmarks, and BandalPandasBenchmark source files, plus 8 DocC articles and complete symbol curation in Sources/Bandal/Bandal.docc/.
  • Scripts/benchmark.sh: pandas vs Bandal (native Swift, MLX CPU, MLX GPU) comparison that provisions a uv environment, builds the BandalPandasBenchmark target (Sources/BandalPandasBenchmark/main.swift), and prints computation-only timings with checksum verification.

Performance

  • rolling / expanding sum, mean, count use a native single-pass O(n) kernel (Neumaier-compensated for sliding windows) instead of MLX prefix sums, now 2.6x (rolling) and 5x (expanding) faster than pandas on 1M–5M rows in all execution policies.
  • Element-wise +, -, *, / and sqrt use a single-pass SIMD kernel that folds the finite check into the write loop, and the native-policy fallback shares it; sqrt/sign no longer use the GPU Float32 path. arithmetic_sqrt is now ≥ 1.05x vs pandas in all policies.

v0.1.3

Choose a tag to compare

@nedpark nedpark released this 06 Nov 05:29
ff026ac

Bandal v0.1.3 — Faster than pandas across the benchmark suite

v0.1.3 is a performance release. Every workload in the pandas comparison benchmark now runs at or above pandas speed under all four execution policies (native, cpu, gpu, gpuFloat32). Checksums still match pandas (match: ok). There are no public API changes.

Performance (5,000,000 rows, speedup vs pandas)

Workload v0.1.3
left_join ~130x
groupby_sum ~30x
sort ~6.3x
correlation ~6x (native/CPU), 4.4x (GPU)
filter ~6x
expanding(.sum) ~5x
rolling(.mean, window: 20) ~2.7x
summary() 1.5x (CPU) – 3.3x (GPU)
arithmetic + sqrt ~1.1x

Median computation time only, pandas 3.1.1 vs Bandal. Reproduce with Scripts/benchmark.sh --rows 100000,1000000,5000000.

Highlights

  • Rolling and expanding windows: sum, mean and count now use a native single-pass O(n) kernel with Neumaier-compensated summation. They no longer go through MLX prefix sums, which were about 0.5x of pandas under the MLX policies.
  • Element-wise arithmetic and sqrt: + - * / and sqrt use a single-pass SIMD kernel that checks the result is finite as part of the write loop, with no separate validation pass. The native-policy fallback shares the same kernel.
  • GPU Float32 path: sqrt and sign no longer use it, because the Double ↔ Float conversion costs more than the GPU saves.
  • Columnar engine (Phase 8): unboxed typed paths for group-by, joins, sorting, filtering and BitSet slicing, plus O(N) sliding-window kernels.

Quality

  • 69 tests pass with swift test and Scripts/test-with-mlx.sh.
  • New tests cover sliding and expanding windows with missing values across execution policies, sliding-sum accuracy after a large value leaves the window, and chained multiply → add → sqrt with negative inputs.

Upgrade

.package(url: "https://github.com/NeuroAssociates/Bandal.git", from: "0.1.3")

v0.1.2

Choose a tag to compare

@nedpark nedpark released this 06 Nov 03:03
1c44ac3

Highlights

0.1.2 removes [DataValue] boxing between columnar storage and MLX, and adds a large set of pandas-style APIs. Every public declaration is now documented, and Bandal ships a DocC catalog.

Added

  • Vectorized boolean indexing: BooleanMask (&&, ||, !), Series comparison operators (<, <=, >, >=, equals(_:), notEquals(_:)), df[mask] and filtered(by:).
  • Math and scaling: UnaryMathFunction with applying(_:) and power(_:) (MLX-accelerated), standardized, minMaxScaled.
  • Binning, interpolation and conditional replacement: binned (pd.cut), quantileBinned (pd.qcut), interpolated, where(_:otherwise:), indexOfMax() / indexOfMin().
  • Windows: exponentiallyWeighted / exponentiallyWeightedMean (ewm) and minPeriods for rolling.
  • Reshaping, grouping and joins: pivoted, crossTabulated, oneHotEncoded, GroupedDataFrame.filter(_:), aggregation aliases (as:), pipe(_:), joinAsOf (merge_asof), resample.
  • Structured results: SeriesDescription (describeStructured()) and QuantileTable (quantiles(_:)).
  • Execution policy: ExecutionPolicy.gpuFloat32, which runs general finite floating-point workloads in Float32 on the Metal GPU.
  • Documentation: /// comments on all public declarations, a DocC catalog and .spi.yml for Swift Package Index, and a "Project structure" section in CONTRIBUTING.md.

Performance

  • Float64Column / Int64Column share numeric buffers and feed MLX kernels directly, with no [DataValue] round-trips.
  • Series is backed by a typed column, and unchanged columns are reused in O(1) by withColumn, select, drop and similar operations.
  • Fused MLX.eval calls for moments and cumulative operations.
  • Strided MLX rolling windows for sum, mean, min, max, variance and standard deviation.
  • Columnar query masks and multi-key groupBy using dense Int32 group IDs.
  • CSV fields are parsed straight into typed column builders.

Changed

  • CheckPoints.md and ToDo.md moved to Documentation/Development/; AGENTS.md stays at the root.
  • Simplified .gitignore. Package.resolved is no longer tracked.
  • English and Korean docs (API, README) updated.

Compatibility

  • No breaking changes to the public API. Requires macOS 14+ and Swift 6.4+.
  • All 66 tests pass.

Installation

.package(url: "https://github.com/NeuroAssociates/Bandal.git", from: "0.1.2")

v0.1.1

Choose a tag to compare

@nedpark nedpark released this 24 Oct 10:33
b7221ab

v0.1.1: High-Performance Columnar Engine (Apache Arrow/Polars model)

Introduce a typed columnar storage architecture inspired by Apache Arrow and Polars to eliminate cell-level DataValue boxing, reduce dictionary allocations, and dramatically accelerate core DataFrame operations.

Highlights:

  • Typed Columnar Storage: Added BitSet, AnyColumn protocol, and specialized columnar buffers (Float64Column, Int64Column, StringColumn, CategoricalColumn, BooleanColumn, DateColumn, AnyValueColumn) with zero-copy slicing.
  • 64-bit Word Bitmap (BitSet): Zero-overhead null tracking and fast boolean mask evaluation with hardware popcount.
  • High-Performance Joins: Replaced per-row dictionary construction with integer index gathering and slice(atOptional:) columnar slicing (~3x faster left joins: 19.59ms -> 6.95ms on 40,000 rows).
  • Vectorized GroupBy: Single-pass dense Int32 group ID assignment and scatter aggregation directly into contiguous accumulation buffers (43% faster: 12.01ms -> 6.79ms).
  • Direct Primitive Sorting: Fast paths for Double, categorical code ranks, timestamps, and strings directly sorting raw index buffers.
  • Streamlined CSV Parser: File size-based capacity pre-allocation, quote-free line splitting, UTF-8 BOM auto-detection, and zero-allocation Substring-based numeric parsing (130ms -> 84.39ms).
  • 100% Backward Compatibility: All 63 existing unit tests pass with zero compiler warnings."

v0.1.0

Choose a tag to compare

@nedpark nedpark released this 24 Oct 04:26

Bandal v0.1.0 — First Release
Bandal is a Swift package for tabular data analysis, inspired by pandas and designed with Swift API conventions. This first release provides an immutable, value-oriented API for working with data frames, series, and rows.

Highlights

Create, inspect, filter, sort, and transform DataFrame, Series, and DataRow values.
Read and write CSV with a streaming RFC 4180 implementation, and read and write JSON.
Query data with composable predicates or expression strings; add computed columns and work with missing values.
Group, aggregate, and transform data; join tables; reshape and transpose data; and use rolling and expanding windows.
Calculate descriptive statistics, quantiles, ranks, correlations, and covariances.
Use MLX Swift to accelerate numeric operations, with automatic native Swift fallback when acceleration is unavailable or unnecessary.
Print pandas-style summaries and render tables as Markdown.
Requirements

macOS 14 or later
Swift 6.4 or later
Apple silicon recommended for MLX acceleration

--

Bandal v0.1.0 — 첫 번째 릴리스
Bandal은 pandas에서 영감을 받아 Swift API 설계 원칙에 따라 만든 테이블형 데이터 분석용 Swift 패키지입니다. 이번 첫 릴리스에서는 데이터 프레임, 시리즈, 행을 불변 값 타입 중심의 API로 다룰 수 있습니다.

주요 기능

DataFrame, Series, DataRow 생성 및 조회, 필터링, 정렬, 변환
RFC 4180 기반 스트리밍 CSV 입출력 및 JSON 입출력
조합 가능한 조건식 또는 문자열 표현식으로 데이터 쿼리, 계산 컬럼 추가, 결측값 처리
그룹화·집계·변환, 테이블 조인, 데이터 재구조화·전치, 롤링 및 확장 윈도우
기술 통계, 분위수, 순위, 상관계수 및 공분산 계산
MLX Swift 기반 수치 연산 가속 및, 가속을 사용할 수 없거나 불필요한 경우 네이티브 Swift로 자동 폴백
pandas 스타일 요약 출력 및 Markdown 표 렌더링
요구 사항

macOS 14 이상
Swift 6.4 이상
MLX 가속을 위해 Apple Silicon 권장