434 karma · joined Apr 24, 2022 (4y ago) · 238 submissions
comment 3y ago · link · parent
Just to add, here are a few other things that also limit your day to day freedom and add some risk of legal nightmares:
- operating a business
- owning a home or other building
- running for political office
- raising a child
- using a professional license (medical, law, civil engineer, etc)
comment 3y ago · link · parent
The rate dramatically changes with demographic, for example many of those were married young and did not complete education.
> who you pick to marry
The quote doesn't say whether :) Married men also tend to make more money and work for longer periods of time. There is a cynical view of whether that's good or not, but 40-50 year old single men don't seem to be a particularly successful demographic.
comment 3y ago · link · parent
But yes, you either need to stop occasionally and remove the duplicates or use a set, if the storage is prohibitive.
Otherwise in terms of performance, sorting and unique is much faster than inserting one element at a time in a set.
comment 3y ago · link · parent
This post doesn't think so: https://stackoverflow.com/questions/5889238/why-is-xor-the-d...
comment 3y ago · link · parent
std::map actually seems to fit this role better. It works reasonable well for many workloads and types without tuning a bunch of parameters.
comment 3y ago · link · parent
Complexity is not a measure of runtime. The performance drawbacks for std::map have to do with cache, not O(log) vs O(1). log(billion) is 30. And that's exactly how many comparisons you have to do, not a constant multiple of that.
With an open addressing hash table, who knows how many steps you will need to find an element. It's even more questionable if it does linked list chaining.
> binary search tree.
It's usually a red black tree and maybe could be a b-tree? "Search tree" is accurate.
comment 3y ago · link · parent
This also presupposes that making a fast program is a lot more work. However poor performance is usually due to negligence rather than a lack of optimization effort. All you need to write reasonably fast code by default (without micro-optimizing) is:
1. a good knowledge of available algorithms 2. a good understanding of the problem
1. Is a one-time investment on the programmers part that benefits all future programs they write. There is no marginal cost to being familiar with what's available in <algorithm>. 2. Has a marginal cost, but it's probably a time saver anyway. Measure once, cut twice.
comment 3y ago · link · parent
> The point about systemic risks is they don’t go away just because they haven’t happened yet.
I agree. But observing a state of instability or unpredictability is different than saying "X economic event a 10% chance of happening".
comment 3y ago · link · parent
I guess I can see some crazy combination of physical objects colliding and nobody being able to predict where they land, I'm just not sure thats the right model for valuation of an asset.
> tail risk
Sorry if I introduced that. I just meant that it's occurrence far outside of the regular distribution.
comment 3y ago · link · parent
when the tweet was made the universe was about to make a dice roll. There was a probability that bitcoin went down and a probability that bitcoin went to the current price, and the universe rolled and happened to land on the current state, but the others could also have happened if luck had gone another way?