8,815 karma · joined Mar 6, 2011 (15y ago) · 1,958 submissions
Email is username at kylehuey.com.
comment 1w ago · link · parent
comment 1mo ago · link · parent
This is essentially what has happened in coastal California over the last 60 years.
comment 3mo ago · link · parent
I discussed this with a coworker earlier this week and the best they were able to come up with was
for &x in input {
out.push(x);
n += (x > threshold) as usize;
out.truncate(n);
}
which works but is ugly af imo.comment 3mo ago · link · parent
e.g. Fidelity's fund for people planning to retire around 2050 https://fundresearch.fidelity.com/mutual-funds/summary/31579...
comment 4mo ago · link · parent
If you did check it for accuracy then I don't understand how you compressed months of work into minutes.
comment 4mo ago · link · parent
Commercial carriers such as airlines are also not allowed to transport people who need ESTAs/visas and do not have them to the US, so in practice it's relatively difficult to even get to the port of entry without a visa.
comment 4mo ago · link · parent
The SimplifyCFG pass in LLVM pulls the identical-in-all-but-one-operand store IR instructions into a successor block with a [select instruction](https://llvm.org/docs/LangRef.html#select-instruction) that will ultimately become a conditional move. But the pointer math differs by two operands (because there are two different pointers and one is being decremented and one is being incremented) so SimplifyCFG stops immediately and never reaches the stores.
This sort of brittle behavior where semantically identical code produces different optimization results is common in optimizing compilers unfortunately.
comment 4mo ago · link · parent
In this specific instance, at the hardware level it helps to understand how the branch predictor works and why quicksort in particular is essentially the worst case for the branch predictor, and then you'll understand why the cmov/csel optimization is such a big win.