HN user

Jenya_

89 karma
Posts0
Comments62
View on HN
No posts found.

| a parody on "мне по плечу"

As I native, I would assume that "мне по хрену"/"мне похрен" is an euphemism of the more rough variant "мне похуй" (it is up to my dick, same height as my dick).

The problem solved by arena allocators here is to avoid many calls to malloc. System allocator is slow, especially in multithreaded environment. Instead of calling malloc 1000 times to allocate 1000 small pieces (like 16 bytes sized each), malloc is called once and then all the small pieces are carved from the big memory block.

The arena allocators are also popular in game development. Memory is allocated from the arena allocator during frame processing (16 ms), and all this allocated memory is deallocated at once at the end of the frame.

Our arena allocator does not reuse memory for simplicity (it allocates only forward, like a stack). A lot of the libc malloc complexity comes from the need to manage deallocated pieces of memory.

Which means that using array over this arena would waste more memory (due to array resizing) than linked list. When array is resized, the unused memory from the old array will stay unused until the whole arena is deallocated.

On my work we do use linked lists, they are simple and convenient to collect a few items of data together when the item count is not known in advance. The trick is to allocate linked list structures from the arena allocator (which keeps these structures close in memory). The programs in my work may run for days and may use terabytes of RAM (EDA chip design verification).

I agree that linked lists could be optimized, but usually they are not the worst offender. The biggest gains in performance usually happen when an accidental O(n^2) slowdown is replaced with a correct n*log(n) version.

It includes a 5K display which may become useless in five years? (when Apple plans to stop updates for Intel based Macs). It seems that iMacs do not support using them as expernal displays right now. I would prefer 5K monitor to last a bit longer than five years.

A Lady Logician 9 years ago

"Due to the fact that women could not do experiment work in laboratories she was forced to choose mathematics[1] over physics, a decision that she regretted all of her life."

The first issue is addressed by a reputation system (e.g. like in LocalBitcoins where traders have the history and reputation). For cops to get a good reputation would mean actually selling drugs to a lot of people.

And the second issue: what if cops traced the package to a country where selling these drugs is legal (e.g. generics in India)?