Recent submissions

Comment · 4 years ago
Comment · 4 years ago
I agree, this looks like a quick and dirty attempt to get account blocked.
Comment · 4 years ago
Tweet is addressed to several accounts, one of them is KyivIndependent which reports Ukraine related news. The tweet looks like a death wish from RU supporter.
Comment · 4 years ago
| 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).

Comment · 5 years ago
Lol, so many questions :). I myself only use linked list when I do not know in advance how many items I will get. Otherwise I do allocate an array.
Comment · 5 years ago
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.

Comment · 5 years ago
Yes, it works fine. I will only add that we do reuse memory. The program deallocates memory managers when they are no longer needed (there could be millions of them at any single time).
Comment · 5 years ago
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.

Comment · 5 years ago
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.

Comment · 6 years ago
Comment · 6 years ago
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.
Comment · 6 years ago
Comment · 8 years ago
Comment · 8 years ago
there is a spelling error on the site: ...Dim any nuber of screens...
Comment · 8 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton