Readit News logoReadit News
Jenya_ commented on What a gas stove ban means for restaurants   latimes.com/food/story/20... · Posted by u/fortran77
kmtrowbr · 4 years ago
I don't see how it makes sense: the electricity has to be generated, which is almost always via burning something to heat a boiler. Then the electricity is sent to houses via the grid, which involves further losses. So you burn something, make heat, make electricity, send the electricity though wires, to make heat. Vs, just making heat directly in the house to accomplish the job.

If all our electricity came from renewable power then sure, I agree. But most does not. So, this seems like putting the cart before the horse. Why not focus on improving how we generate electricity before we tear out all the gas?

My undergrad degree was electrical engineering. Basically, it seems visible to everyday people, and theatrical, but not that helpful or practical. Happy to hear how I'm wrong. I am certainly very concerned about the environment.

Jenya_ · 4 years ago
Natural gas heating is very inefficient (e.g. versus electric kettle). There was recent Technology Connections video about that:

https://www.youtube.com/watch?v=_yMMTVVJI4c

Jenya_ commented on Twitter blocked my account for a tweet I did not make   jacquesmattheij.com/twitt... · Posted by u/jacquesm
jacquesm · 4 years ago
So it wasn't as a reply to anything? Pretty weird. I'm about as far from a RU supporter as it gets, as my very extensive tweet history amply documents.

But it would be a pretty good way to discredit me.

Jenya_ · 4 years ago
I agree, this looks like a quick and dirty attempt to get account blocked.
Jenya_ commented on Twitter blocked my account for a tweet I did not make   jacquesmattheij.com/twitt... · Posted by u/jacquesm
jacquesm · 4 years ago
I don't understand the tweet either because I can't see the context in which it was made. If there was any...
Jenya_ · 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.
Jenya_ commented on “Zero fucks given” in other languages   twitter.com/AdamCSharp/st... · Posted by u/damir
hamstergene · 4 years ago
That's a completely effortless translation.

I am pretty sure that "мне по хрену" is a parody on "мне по плечу" (literally "fits my shoulder" but means "doable to me / within my powers"). Russian people coin new expressions with such witticisms all the time.

So, reproducing the same parody in English, one could say "fits my wiener". Horseradish here being an obscenity-avoiding euphemism for c*ck (like English "wiener"), not the plant (just like all the sausages and cucumbers in the other languages).

Jenya_ · 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).

Jenya_ commented on Why do interviewers ask linked list questions?   hillelwayne.com/post/link... · Posted by u/pyb
CyberDildonics · 5 years ago
Again, I don't understand why you wouldn't just allocate large arrays, especially knowing that excessive memory allocation is slow and going to lock on top of that (you could use jemalloc, but that is orthogonal here).

> 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.

No one who has any idea about performance is saying lots of memory allocations are ok. It sounds like what you are doing though is allocating arrays but then using them for 'arena allocators' when you could just use them directly and use indices for ordering if you need that.

> 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.

I would ask why the memory needs to be deallocated at the end of each frame. A C++ vector can be cleared without releasing its capacity. What you really want is to have all the memory that you need allocated once so it can be reused over and over easily. There is no reason to involve an allocator on a frame to frame basis of a video game unless you go over what you already thought you would need.

If you have 'millions' of 'memory managers', why not just use a few big arrays? It really seems like an over complication of a problem that doesn't need to be difficult. I'm surprised no one would take the time to clean that out if there are terabytes of memory used and multiple days for single program runs.

Jenya_ · 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.
Jenya_ commented on Why do interviewers ask linked list questions?   hillelwayne.com/post/link... · Posted by u/pyb
CyberDildonics · 5 years ago
> Which means that using array over this arena would waste more memory (due to array resizing) than linked list

I think you are way off track. The point here is that whatever you are doing is unnecessary. You don't need an arena and probably don't need a linked list. You are using an arena allocator as an array already if you are never freeing anything. Just make fewer large allocations.

> does not reuse memory for simplicity (it allocates only forward, like a stack)

First, stacks can shrink when items are popped off. Second, if you are using an 'arena allocator' and a linked list on top of it when you could actually just allocate memory into an array are you really gaining simplicity? You are purposely not reusing memory and have a program using terabytes of memory and running for multiple days. Is that really simplicity?

Pretty much everything you have said so far is an enormous red flag, but the good news is that there are probably ways where you can use orders of magnitude less time and memory while making the program more straight forward.

Jenya_ · 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.

Jenya_ commented on Why do interviewers ask linked list questions?   hillelwayne.com/post/link... · Posted by u/pyb
CyberDildonics · 5 years ago
> Which means that using array over this arena would waste more memory (due to array resizing) than linked list

I think you are way off track. The point here is that whatever you are doing is unnecessary. You don't need an arena and probably don't need a linked list. You are using an arena allocator as an array already if you are never freeing anything. Just make fewer large allocations.

> does not reuse memory for simplicity (it allocates only forward, like a stack)

First, stacks can shrink when items are popped off. Second, if you are using an 'arena allocator' and a linked list on top of it when you could actually just allocate memory into an array are you really gaining simplicity? You are purposely not reusing memory and have a program using terabytes of memory and running for multiple days. Is that really simplicity?

Pretty much everything you have said so far is an enormous red flag, but the good news is that there are probably ways where you can use orders of magnitude less time and memory while making the program more straight forward.

Jenya_ · 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).
Jenya_ commented on Why do interviewers ask linked list questions?   hillelwayne.com/post/link... · Posted by u/pyb
CyberDildonics · 5 years ago
There are a couple of large red flags here, but why not just use an array instead of an arena allocator and a linked list (of pointers I'm guessing).

If you need a linked list, use an array with indices and you can cut the size in half if you don't need 64 bit integers. If it has to be enormous, make a linked list of arrays for better locality.

Jenya_ · 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.

Jenya_ commented on Why do interviewers ask linked list questions?   hillelwayne.com/post/link... · Posted by u/pyb
tdeck · 5 years ago
It's kind of funny that linked lists are almost never an appropriate choice on modern systems because of their poor locality and cache performance. Linked lists were a much better fit for 1970s and early 1980s microprocessors that almost never had caches (memory access time in the 1970s was similar to clock speed).

That means linked lists are increasingly relegated to toy problems and unusual domains. They're no longer really a practical tool to organize data - it would be better in many cases to use an array and copy the entire contents on insert.

Jenya_ · 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.

Jenya_ commented on AMD Reveals the Radeon RX 6000 Series, Coming November 18th   anandtech.com/show/16202/... · Posted by u/jsheard
jonplackett · 5 years ago
I mean it will be compared by Apple, when they launch their new apple silicon macs and want to show off how much faster their chips are than previous Intel - likely taking all the credit, when a large part is down to TSMC's 5nm process.
Jenya_ · 5 years ago
The 5nm process from TSMC could be less of a success, as say Anandtech editor on Twitter (his A14 review incoming) https://www.reddit.com/r/hardware/comments/jjwtjy/andrei_fan...

u/Jenya_

KarmaCake day89April 10, 2016View Original