Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add struct/row proxy objects via useProxy option. #12

Closed
wants to merge 2 commits into from
Closed

Conversation

jheer
Copy link
Member

@jheer jheer commented Aug 26, 2024

  • Adds an option for representing Struct types and table row objects as zero-copy proxy objects with getter properties that retrieve data directly from underlying Arrow batches. This representation is enabled by passing a useProxy option to the tableFromIPC method. These proxies require substantially less memory and are faster for single-access use, but do not support object manipulation methods such as Object.keys, Object.values, and spreading { ...object }.

The proxy representation follows the strategy of the Vega arrow loader and suggestions from @mcovalt.

Benchmarks show non-trivial performance improvements (25-35% reduced running time) for these proxy objects vs. vanilla JS objects: 26.72ms vs. 40.23ms for flights.arrows and 441.24ms vs. 576.23ms for scrabble.arrows. However, due to their simplicity and convenience methods, this PR leaves vanilla objects as the default object representation (hence the opt-in via useProxy). Both methods in Flechette remain substantially faster than the Arrow-JS reference implementation.

@jheer
Copy link
Member Author

jheer commented Sep 11, 2024

Replaced by #15.

@jheer jheer closed this Sep 11, 2024
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.

1 participant