-
Notifications
You must be signed in to change notification settings - Fork 3
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
Milestones to v1.0 #46
Comments
Hi, this package was not intended to be a general-purpose bit manipulation package. Still, it has a lot of overlapping with general bit manipulation, e.g this package also supports dits. It'd be nice if there are more users trying it and reporting back on API designs instead rush into 1.0. Otherwise, we'd stay as it is since it's a quite stable component of Yao.jl |
Hi, I played a bit with the package and liked a lot of its ideas. However, the differences in memory layout and mutability between having What do you think? How could the things go to have a general purpose, performan bit manipulation package? |
If you use The internal data structure of |
Yeah, my fault. I was actually speaking about The only problem I see is the multiplicity of representations. A bitstring with internal |
|
I'd like to avoid messing with I have been reading (quickly) over LLVM's primitive types and they include integers with arbitrary length. I guess that Julia does not support them out of the box because they have no direct correspondence to native types in most architectures, isn't it? I have also peeked at the internals of your package and gathered how things are done there. If you'd rather keep this packages separate just for bit basis for Yao, I think I can create a separate package specifically for bitstring manipulation. It'd include the possibility of having both long and short (< 128-bit) bitstrings, just like yours. For the long bitstrings I can use small I could go directly with Thanks for your help! |
Please go ahead for creating a new package. This package kinda handles the bit configuration and basis at the same time so it will likely be deprecated in a new rewrite we are working on with explicit basis support. It'd be nice to rethink about bit configurations in a separate manner. I think Julia lowers its own primitive type to LLVM primitive but with limitation on a maximum size. Yeah I think for long bits SVector is good, but remember there's also a size limitation on SVector, thus it cannot be arbitrary large. For arbitrary large bits you will still want Vector{UInt8} or BigInt. Unless you have a very specific use case that must compile binaries in Julia, I wouldn't expect too much on StaticCompiler at this stage it is highly experimental and will need a lot more work to reach a more usable state. What's wrong with heap allocation tho? If you have a large bit stream there's no other way but heap allocate. On the other hand, the best way of supporting such type is just having different types under the same abstract type since their behavior could be quite different. |
Regarding heap allocation, besides the StaticCompiler caveat, I have nothing against it. However, the native On the one hand, Julia's On the other hand, providing a new package with specialized functions and methods for specific |
but it lacks manipulation tools and kinda follows the Array interface, which does not make sense when you think of bit strings - the mental model will be closer to a string plus some extra features rather than an array. We kinda end up converting to But anyway, I think it doesn't hurt to start with stack-allocated ones. We currently don't have the bandwidth on expanding more features for generic usage, but please feel free to ping me if you have more questions. Ideally, bit string, dit string, etc. deserve a common interface (trait) instead of using an array interface. |
Thanks! I'll keep you on the loop. |
Hello everyone
I am interested in native Julia packages for bit manipulation, and this seems to be the best (along with native
bitarray
, which I suspect is less performant than this package).However, it seems to be stuck since some time ago in pre v1.0 phase. Could we set any milestones needed to push forward the package to its first semver-stable release?
Thanks!
@Roger-luo @GiggleLiu
The text was updated successfully, but these errors were encountered: