-
Notifications
You must be signed in to change notification settings - Fork 38
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
Some Questions #62
Comments
Performance is the main reason, but it's due to aliasing, rather than anything else. Basically, many algorithms work perfectly well with the input and output being the same place, or overlapping as long as they overlap in the right way. That doesn't work for regular borrowed pointers, I can't have a
I'll admit the details are fuzzy, it's a complicated algorithm that I struggled to get working correctly. Well, there's actually several algorithms, since it handles certain cases differently, but I digress. I'll look over it and see if I can write some more documentation on the actual function of the algorithm. The comments are mostly For #6, that's just something I haven't got around to yet. If you want to take a stab at it, go for it. I lay out roughly what needs to be done there, but fell free to ask questions on that issue if you need to. |
Note: During testing if I am doing unsafe the correct way, i figured:
Edited: Okay. Anything with mem::transmute is probably the way to hell. (The len will not be updated) |
Hey
I looked a little bit around at the source code and thought about all that unsafe pointer usage.
Why is that and why not using slices that also carry pointer and length information? Is this a port of some C library? Performance reasons?
Secondly, I tried to understand how divmod works, but no chance by just looking at it. Can you give me a hint how the algorithm is called or where to search for more information?
I'm more a of rust beginner, but I maybe could contribute some things. I thought of three things:
@Aatch Do you approve? Do you have time to review PRs?
The text was updated successfully, but these errors were encountered: