Skip to content

as.integer64 keep cache and names#311

Open
hcirellu wants to merge 4 commits intomainfrom
as_integer64_keep_cache_and_names
Open

as.integer64 keep cache and names#311
hcirellu wants to merge 4 commits intomainfrom
as_integer64_keep_cache_and_names

Conversation

@hcirellu
Copy link
Copy Markdown
Collaborator

@hcirellu hcirellu commented Apr 7, 2026

as.integer64.integer64 should not create unnassecary copies, if the input already is a "plain" integer64.
It should also keep a valid cache, because it is the design of the package to support caches and keep them as long as possible.
Since bit::clone() invalidates existing caches (because bit::still.identical() is false after cloning), an explicit remcache() is added after clone() to avoid the warning "removing outdated cache" at unexpected places.

The argument keep.names is hidden behind ... and expanded to more methods, such that as.nanotime(1:10) also works as intended.

Closes #272

hcirellu added 4 commits April 7, 2026 15:04
…false after clone(). So an explicit remcache() is added to avoid warning messages about outdated caches at random places.
@hcirellu hcirellu marked this pull request as ready for review April 7, 2026 13:37
@hcirellu hcirellu requested a review from MichaelChirico April 7, 2026 13:37
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.

Should as.integer64() always clear the cache?

1 participant