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

Hashing objects other than vectors #5

Open
theoldfather opened this issue Oct 9, 2016 · 1 comment
Open

Hashing objects other than vectors #5

theoldfather opened this issue Oct 9, 2016 · 1 comment

Comments

@theoldfather
Copy link

I imagine since you already have the ability to hash character vectors, it may not be too difficult to add the ability to hash serialized versions of other objects.

serialize(list(),connection=NULL)
 [1] 41 0a 32 0a 31 39 37 33 37 37 0a 31 33 31 38 34 30 0a 31 39 0a 30 0a
@nathan-russell
Copy link
Owner

The hashing of character vectors is not actually related to serialization, as I am just converting them to std::strings and using the default boost::hash to generate hash values.

Serializing objects efficiently would require performing this from the C++ side (most likely using R's internal serialization functions), and this would be a nontrivial feature to implement. While having the ability to hash objects other than simple vectors would be nice, it's not terribly high on my priority list as I made a conscious decision from the beginning to trade versatility for better performance. That being said, I'd be happy to review a well-written pull request.

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

No branches or pull requests

2 participants