Hacker Newsnew | past | comments | ask | show | jobs | submit | Kranar's commentslogin

This is untrue, algorithms measure time complexity classes based on specific operations, for example comparison algorithms are cited as typically O(n * log(n)) but this refers to the number of comparisons irrespective of what the complexity of memory accesses is. For example it's possible that comparing two values to each other has time complexity of O(2^N) in which case sorting such a data structure would be impractical, and yet it would still be the case that the sorting algorithm itself has a time complexity of O(N log(N)) because time complexity is with respect to some given set of operations.

Another common scenario where this comes up and actually results in a great deal of confusion and misconceptions are hash maps, which are said to have a time complexity of O(1), but that does not mean that if you actually benchmark the performance of a hash map with respect to its size, that the graph will be flat or asymptotically approaches a constant value. Larger hash maps are slower to access than smaller hash maps because the O(1) isn't intended to be a claim about the overall performance of the hash map as a whole, but rather a claim about the average number of probe operations needed to lookup a value.

In fact, in the absolute purest form of time complexity analysis, where the operations involved are literally the transitions of a Turing machine, memory access is not assumed to be O(1) but rather O(n).


Time complexity of an algorithm specifically refers to the time it takes an algorithm to finish. So if you're sorting values where a single comparison of two values takes O(2^n) time, the time complexity of the sort can't be O(n log n).

Now, you very well can measure the "operation complexity" of an algorithm, where you specify how many operations of a certain kind it will do. And you're right that typically comparison sorting algorithms complexities are often not time complexities, they are the number of comparisons you'll have to make.

> hash maps, which are said to have a time complexity of O(1), but that does not mean that if you actually benchmark the performance of a hash map with respect to its size, that the graph will be flat or asymptotically approaches a constant value.

This is confused. Hash maps have an idealized O(1) average case complexity, and O(n) worse case complexity. The difficulty with pinning down the actual average case complexity is that you need to trade off memory usage vs chance of collisions, and people are usually quite sensitive to memory usage, so that they will end up having more and more collisions as n gets larger, while the idealized average case complexity analysis assumes that the hash function has the same chance of collisions regardless of n. Basically, the claim "the average case time complexity of hashtables is O(1)" is only true if you maintain a very sparse hashtable, which means its memory usage will grow steeply with size. For example, if you want to store thousands of arbitrary strings with a low chance of collisions, you'll probably need a bucket array that's a size like 2^32. Still, if you benchmark the performance of hashtable lookup with respect to its size, while using a very good hash function, and maintaining a very low load ratio (so, using a large amount of memory), the graph will indeed be flat.


Vlang uses tcc though...


Three of those are forks to upstream back to the main repo, and one of them is dead.


> Three of those are forks to upstream back to the main repo

and you think the patches they upstream they don't use in the meantime...?

> and one of them is dead.

yes because the currently used fork isn't public obviously


People said the same thing about so many other online services since the 90s. The issue is that you're imagining ChatGPT as it exists right now with your current use case but just with ads inserted into their product. That's not really how these things go... instead OpenAI will wait until their product becomes so ingrained in everyday usage that you can't just decide to stop using them. It is possible, although not certain, that their product becomes ubiquitous and using LLMs someway somehow just becomes a normal way of doing your job, or using your computer, or performing menial and ordinary tasks. Using an LLM will be like using email, or using Google maps, or some other common tool we don't think much of.

That's when services start to insert ads into their product.


> People said the same thing about so many other online services since the 90s.

And this leads to something I genuinely don't understand - because I don't see ads. I use adblocker, and don't bother with media with too many ads because there's other stuff to do. It's just too easy to switch off a show and start up a steam game or something. It's not the 90s anymore, people have so many options for things.

Idk, maybe I am wrong, but I really think there is something very broken in the ad world as a remenant from the era where google/facebook were brand new and the signal to noise ratio for advertisers was insanely high and interest rates were low. Like a bunch of this activity is either bots or kids, and the latter isn't that easy to monetize.


Except it's hard to imagine a world where chatgpt is heads and shoulders over the other llms in capability. Google has no problem keeping up and let's not forget that China has state-sponsored programs for AI development.


Except that I have switched to Gemini and not missed anything from OpenAI


And if/when they reach that point, the average consumer will see the ad as an irksome fly. That's it.


The ads can be subtile. Same way Claude today prefers to generate html with tailwindcss. Feels like an ad for tailwind as sometimes when I ask it to do something else it still just gives me tailwind


Every service I know of explicitly bans this practice, so unless you can employ the cleaner full time then if they accept your arrangement they risk getting fired.


I don’t know the service company in question, but if it’s a gig-style matchup, how would the company know what their contractors are doing? Also, wouldn’t this incentivize the contractors to develop as many personal relationships as possible, as a hedge against getting arbitrarily kicked by the contracting company?


Semi-related:

If I'm not mistaken, services like Upwork and Fiverr will look at certain metrics for outliers, like repeat business in a particular industry. And for eBay, I think they’d look into cancelled bids on high-value items and check messaging history.

Disclaimer, based on old memories


Data analysis. If someone has a low repeat customer stat, but high ratings, smells fishy.


It's a common misconception that std::shared_ptr is thread safe. The counter is thread safe, but the actual shared_ptr itself can not be shared across multiple threads.

There is now atomic_shared_ptr which is thread safe.


It is now a template specialization of atomic std::atomic<std::shared_ptr<T>>.


Rules changed in 2003, but until then medical residency programs routinely had doctors working 100+ hours a week or longer. In 2003 a cap of 80 hours a week was instituted along with a maximum of 24 hours in any given period, but programs found various loopholes around that cap which still had doctors working close to 100 hours a week. So further restrictions were placed so that over any 4 week period there's a hard cap of 320 hours, no exceptions.

At any rate, for most of the HN crowd who work a fairly routine IT or an office job, 80+ hours sustained for months and months might seem impossible, but join the military, work on a ship, work on a farm, work the oil fields, work in investment banking, work in a film crew which threatened to go on strike in 2021 for having 98 hour work weeks for months on end... and you find that while it's not common, it certainly happens in various fields.


Are residents and people working on ships actually making decisions for 100 hours a week? It's the cognitive load that I find difficult to believe about these numbers, not the

At one point I was also working crazy hours at a fast food shop. But that was only possible because I could "zone out" and just pour the customer's coffee and make sandwiches. Writing code for that long would have been impossible.


Obviously not every moment of every hour in a residents day is deep clinical thinking with high cognitive load, but we’re definitely not “zoning out” when making medical decisions. Patient statuses change very quickly and very often in the hospital, and every problem should be re-evaluated like it is a fresh concern. Decisions can be made quicker with more experience but you’re expected to be “on” all the time. Plus, lots of things contribute to cognitive load outside sheer medical decisions - social work, dispo issues, patient preferences, etc. Luckily my residency is closer to 60-70 hours a week but 100 is still common.

Remember - the 80 hour a week limit is not a max limit. It is the max hours per week AVERAGED OVER 4 weeks. You can easily work 100 hours this week if you do 60 the next.


> Are residents and people working on ships actually making decisions for 100 hours a week?

Residencies? Yeah. The guy who came up with the US' system for medical residency was high on cocaine pretty much constantly and expected everyone to perform at his level.

https://www.wolterskluwer.com/en/expert-insights/a-day-in-th...

https://en.wikipedia.org/wiki/William_Stewart_Halsted


>. In 2003 a cap of 80 hours a week was instituted

Oh you sweet summer child, was instituted on paper

Here's how it actually works. "Mark down the hours you worked this week. Oh. And if it's over 80 of course we'll run into big problems for violating this rule and your residency will lose credentials which is bad for you.. also we'll know it was you"

People who work 90, 100, 110, 120 hours (gets hard north of 130), guess how many hours they put? 80 if they're feeling nice, 81 if they want to make a point. Even today.


I'm sure prisoners in labour camps work more than that. And the death toll for patients cured by overworked doctors is not insignificant.


> If only it were so easy as writing more makes you a better writer!

One commonly repeated piece of advice that almost all successful authors state is to write a lot, a lot, a lot. Like just practice writing, it doesn't have to be good.

I hear this often said about many other creative endeavors as well, including painting, cooking, game development/design, etc... It often seems like really good artisans just pull greatness out of thin air, but that's because we often only see the successes, not the failures, but I am reminded that even the best writers, poets, and artists in general spend a great amount of time just creating content that no one will ever see.


Then she would get no money either.


I don't think that's true in most situations. I think most companies would still pay a severance out of a general effort to smooth things over, and some sense of social loyalties.

And some aspects of the agreement would be fine. No spilling actual business relevant secrets, nothing that would count as libel or slander, etc.


Nope, they'd have security show you the door and maybe threaten to sue you into the ground if you talk. They choose mkney because money is easier, but if you take this option away, you just get the stick and no carrot.


Part of smoothing things over is implicit of explicit understanding that employee also smooths things over that is shut up after receiving the bribe.


You think a business pays money out of a sense of "social loyalty"?

Companies don't need to offer severance to prevent ex employees from spilling business secrets, doing so is a criminal offense.


Companies are people, many people have positive feelings towards co-workers and people like them


True but not the ones who will be firing you. At least not in big corp, it would be some HR worker who doesn't know you from Adam and couldn't care less about you.


They always have the manager, and the director and possibly VP will be in the loop and know what going on.


The immediate manager will be informed, but they can do nothing about it or in any way change the process or the result.


Severance is a financial gain. You don't have to accept it.


Yeah, so in this case the advice "Never sign anything going out the door that isn’t tied to a financial gain." means you should probably sign the NDA.


Their point was kordlessagain's advice would not have changed this situation I think.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: