I wrote some code with raw pointers for my cpu-based NN. Turns out vectors and indexes we're faster because it allowed rust to add SIMD instructions. Don't use pointers unless you absolutely have to, they're usually slower
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I wonder if is possible to prepare some small examples and put them in a cookbook.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
agreed. not to mention, pointers are a massive headache for a lot of similar data structures in c++ too. i’ll be happier if i never have to implement another winged mesh, but i sure as shit would be using indices instead of the rats nest of pointers approach
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I have only reached chapter 9 of the book so far but must admit such thoughts have been going on in the back of my mind.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Yes. Even if C++ std::vector has the same performance as raw pointers but leads to a lot safer code due to the utility of the abstraction (maybe not as provably safe as Rust, but better than C). I just wish STL custom allocators and error model were nicer i.e. std::optional
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.