Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zRedShift
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
zRedShift
6y ago
Yes, primitive types all implement Copy. Maybe playing around with the code would help you better, because that last line doesn't make any sense: https://play.rust-lang.org/?version=stable&mode=debug&editio...
32.
▲
by
zRedShift
6y ago
In Rust ? is the try/error propagation operator. It converts the error to the correct type, if necessary, and returns it. let ok = return_result()?; and let ok = match return_result() { Ok(ok) => ok, Err(err) =
33.
▲
by
zRedShift
6y ago
According to the reddit thread, the benchmarks were done on a pretty beefy MBP. The macOS malloc is known to perform poorly, so I wonder if it's possible to narrow the gap just by using jemalloc, without any other optimisations. &#
34.
▲
by
zRedShift
6y ago
Of course. rustc has the "-C overflow-checks" flag. Cargo turns it on by default for debug builds. To turn it on for release builds, just put "overflow-checks = true" in the [profile.release] section of your Cargo.toml.
35.
▲
by
zRedShift
7y ago
So it's using a K-D-B-Tree under the hood? SP-GiST, that is. https://en.wikipedia.org/wiki/K-D-B-tree