Remix.run Logo
willseth 7 hours ago

Knowing that an empty string is 41 bytes or how many ns it takes to do arithmetic operations is not general knowledge.

oivey 6 hours ago | parent [-]

How is it not general knowledge? How do you otherwise gauge if your program is taking a reasonable amount of time, and, if not, how do you figure out how to fix it?

cycomanic 5 hours ago | parent | next [-]

But these performance numbers are meaningless without some sort of standard comparison case. So if you measure that e.g. some string operation takes 100ns, how do you compare against the numbers given here? Any difference could be due to PC, python version or your implementation. So you have to do proper benchmarking anyway.

willseth 5 hours ago | parent | prev [-]

You gauge with metrics and profiles, if necessary, and address as needed. You don’t scrutinize every line of code over whether it’s “reasonable” in advance instead of doing things that actually move the needle.

oivey 5 hours ago | parent [-]

These are the metrics underneath it all. Profiles tell you what parts are slow relative to others and time your specific implementation. How long should it take to sum together a million integers?

willseth 4 hours ago | parent [-]

It literally doesn’t matter unless it impacts users. I don’t know why you would waste time on non problems.

oivey 3 hours ago | parent [-]

No one is suggesting “wasting time on non problems.” You’re tilting at windmills.

willseth an hour ago | parent [-]

Read more carefully