Skip to content

Conversation

@jimhester
Copy link
Collaborator

Summary

  • Add Google Highway library directly to vroom for portable SIMD operations
  • Create SIMD dispatch module with whitespace trimming optimization
  • Add R-compatible error handling for Highway library
  • Update build system to compile Highway and SIMD dispatch

This PR implements the alternative approach described in #6: integrating Google Highway directly for SIMD operations instead of using the full libvroom library.

The Highway library provides portable SIMD/vector intrinsics with runtime dispatch based on CPU capabilities (AVX2, AVX-512, SSE4, NEON, etc.). The SIMD whitespace trimming functions process data in SIMD-width chunks, which can significantly speed up trimming operations on fields with leading/trailing whitespace.

Test plan

  • Package compiles successfully
  • All existing tests pass (1163 tests, 4 skipped)
  • Existing whitespace trimming tests in test-vroom.R and test-vroom_fwf.R verify correct behavior

Closes #6

Integrate Google Highway library directly into vroom for portable SIMD
operations. This approach uses Highway's dynamic dispatch mechanism to
select optimal implementations at runtime based on CPU capabilities
(AVX2, AVX-512, SSE4, NEON, etc.).

Key changes:
- Add Highway library under src/hwy/ for portable SIMD primitives
- Create simd_dispatch.cc/.h with SIMD-optimized whitespace trimming
- Add r_abort.cc for R-compatible Highway error handling
- Update Makevars to compile Highway and SIMD dispatch module

The SIMD whitespace trimming functions process data in SIMD-width chunks,
providing significant speedup for fields with leading/trailing whitespace.

This addresses the alternative approach mentioned in issue #6: using
Highway directly for SIMD operations without the full libvroom library.

Closes #6

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@jimhester
Copy link
Collaborator Author

Closing - PR should be opened against jimhester/vroom instead

@jimhester jimhester closed this Jan 16, 2026
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.

Whitespace trimming

1 participant