The ideal performance property we should ask of a high-level programming language and library is that it minimizes runtime and compile-time combinatorial complexity. We can accept constant overheads, but not higher-order overheads. This has many implications.
-
-
The other is we should never copy a non-constant-sized data structure, but ensure it can be used in all contexts as-is or with the help of a constant sized adapter.
Show this thread -
Next, we have to abandon manually synchronized memory concurrency. The combinatorial complexity here isn’t in performance but in programmer reasoning. We must either stay single-threaded or adopt purely functional programming or transactions.
Show this thread -
Finally, types should obey the mathematical properties expected of them. This means we must adopt mathematical integers, and if we support smaller integer storage formats, they are still just for storage. The byte 255 plus the byte 1 is not the byte 0, it’s the integer 256.
Show this thread -
If we support floating point, then the float 1.0f can’t be equal to integer 1, because there exist functions f where f(1.0f) is unequal to f(1), and a==b implies that for all f, f(a)==f(b). We must either say 1 is not equal to 1.0f, or that we aren’t allowed to compare them.
Show this thread -
Programming languages should be built on principles first and foremost, and avoid conveniences that violate principles. So much of what’s wrong today is the result of design by “wouldn’t it be nice if” without an earnest enumeration of guiding principles.
Show this thread
End of conversation
New conversation -
-
-
A container type that supports multiple operations doesn’t have a single definition of minimal complexity. Often, you have to tradeoff between multiple „optimal“ combinations.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Right now I could use a String implementation that does just what I think you described, concat the finished string by traversing through the substrings, making it way better to insert something in the middle or use some parts multiple times.
-
But on the other hand, that would be wasteful to re-traverse multiple memory regions / cache segments for a seldom changing string that could be compiled once, cached and used over and over in a 60fps game. There is no perfect solution for all cases, right?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.