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

Change the default type of ref #39

Closed
bkamins opened this issue Oct 27, 2020 · 1 comment · Fixed by #40
Closed

Change the default type of ref #39

bkamins opened this issue Oct 27, 2020 · 1 comment · Fixed by #40

Comments

@bkamins
Copy link
Member

bkamins commented Oct 27, 2020

Currently we have:

julia> x = PooledArray(zeros(Int, 10^6));
julia> copyto!(x, 1:10^6);
ERROR: You're using a PooledArray with ref type UInt8, which can only hold 255 values,
and you just tried to add the 256th reference.  Please change the ref type
to a larger int type, or use the default ref type (UInt32).

I think we should use UInt32 as the default as in practice limiting up to 255 levels by default is a small value. If someone wants such a limit to save memory I would have it as an opt-in rather than the default.

@quinnj - what does CSV.jl use as a default?

@quinnj
Copy link
Member

quinnj commented Oct 27, 2020

CSV.jl uses UInt32; I agree we should just make UInt32 the default here

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 a pull request may close this issue.

2 participants