search for: c_hash2

Displaying 3 results from an estimated 3 matches for "c_hash2".

2024 Jan 18
1
Choices to remove `srcref` (and its buddies) when serializing objects
...ell-defined package API. I have adapted a copy of R's serialize() [*] with the following changes: * Function bytecode and flags are ignored: f <- function() invisible() depcache:::hash(f, 2) # This is plain FNV1a-64 of serialize() output # [1] "9b7a1af5468deba4" .Call(depcache:::C_hash2, f) # This is the new hash [1] 91 5f b8 a1 b0 6b cb 40 f() # called once: function gets the MAYBEJIT_MASK flag depcache:::hash(f, 2) # [1] "7d30e05546e7a230" .Call(depcache:::C_hash2, f) # [1] 91 5f b8 a1 b0 6b cb 40 f() # called twice: function now has bytecode depcache:::hash(f, 2) # [1...
2024 Jan 18
1
[External] Re: Choices to remove `srcref` (and its buddies) when serializing objects
...ed a copy of R's serialize() > [*] with the following changes: > > * Function bytecode and flags are ignored: > > f <- function() invisible() > depcache:::hash(f, 2) # This is plain FNV1a-64 of serialize() output > # [1] "9b7a1af5468deba4" > .Call(depcache:::C_hash2, f) # This is the new hash > [1] 91 5f b8 a1 b0 6b cb 40 > f() # called once: function gets the MAYBEJIT_MASK flag > depcache:::hash(f, 2) > # [1] "7d30e05546e7a230" > .Call(depcache:::C_hash2, f) > # [1] 91 5f b8 a1 b0 6b cb 40 > f() # called twice: function now has...
2024 Jan 16
2
Choices to remove `srcref` (and its buddies) when serializing objects
Could you recommend any packages/functions that compute hash such that the source references and sexpinfo_struct are ignored? Basically a version of `serialize` that convert R objects to raw without storing the ancillary source reference and sexpinfo. I think most people would think of `digest` but that package uses `serialize` (see discussion