python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Save bubble sort with iterator and unseve with raw pointers strange speed
Recently I was playing with bubble sorting and saw a strange phenomenon that I can't understand.
For some reason, code on raw pointers is slower than if I use iterator (if run as cargo run without rel...
Alisher
Votes: 0
Answers: 2
Why do most ffi functions use raw pointers instead of references?
Both in ffi tutorials and in automatically generated interfaces, *const T pointers are used most of the time. As far as I know the difference between &T and *const T is only that *const T doesn't ...
Goldenprime
Votes: 0
Answers: 1
Performance of passing unique_ptr vs. raw pointer to functions
I am working on a program which passes message objects through a chain of functions which are dealing with the messages like doing calculations, storing, queueing, formating, ...
Till now the objects ...
Christian Springer
Votes: 0
Answers: 0
How does Rust infer lifetime while raw pointers are involved?
struct MyCell<T> {
value: T
}
impl<T> MyCell<T> {
fn new(value: T) -> Self {
MyCell { value }
}
fn get(&self) -> &T {
&self.va...
DizzyZeratul
Votes: 0
Answers: 1