Presentation on heap vs. stack

I remember having seen a presentation about objects being stored on the heap vs. stack with some interesting insights. But unfortunately I don’t find it any more.

Several Julia examples have been presented, using a struct called Box which was forced to be stored on the heap or on the stack. I think it was a talk held by @StefanKarpinski … but I’m not sure any more.

Can anybody give me a hint, where I can find this presentation? I would like to use that example in my next lecture on software engineering.

1 Like

I’m not Stefan, but I think you might be thinking of this talk I gave last year in Einhoven: https://www.youtube.com/watch?v=n1nG0_Nwzhs

4 Likes

Was that not the talk by Steve Johnson at MIT?

The main takeaway is “Use the heap and your dead!”

2 Likes

Oh yes, that’s it :+1: … thank you very much :pray:. It’s a really good talk and yesterday I’ve turned YouTube upside down but didn’t find it.

1 Like

It isn’t he presentation I’ve been looking for, but also a really interesting lecture with good examples. Thanks for the hint!

That statement is too strong. It depends on the granularity and size of the data that is stored on the heap. In fact some data will not even fit in the stack at all.

I think the intent of a statement like the one in the quote is to warn against storing lots of small boxed objects on the heap. To store a couple of huge arrays on the heap could be just fine performancewise.

2 Likes