News for hackers. Stuff that matters.
Re:I am sick and tired of hearing tech companies complain ab... by amluto on Friday May 21, 2021 @10:43AM (#27234622)
> copy flat regions

A map or pretty much any nontrivial data structure is not a flat region.

In any event, waiting to optimize until a profiler tells you to is a reasonable practice as long as you pay attention to scaling. It’s very easy to write, for example, a JSON parser that performs fine in small tests and has a nice small n^2 coefficient. And then someone throws in a bigger input than you tested and your game takes ten minutes to load.

Re:I am sick and tired of hearing tech companies complain ab... by pkolaczk on Friday May 21, 2021 @11:18AM (#27235164)
> A map or pretty much any nontrivial data structure is not a flat region.

Not necessarily. A hashmap can be implemented in a way it stores both the keys and values in a flat memory region, as long as keys and values are fixed size, and such a structure is way more efficient that traditional array-of-pointers implementation, where fetching each key requires following a pointer and getting the value requires following another pointer.

Re:I am sick and tired of hearing tech companies complain ab... by amluto on Friday May 21, 2021 @03:38PM (#27238906)
The resulting code will still be asymptotically slow.