Deep Vs. Shallow Copyingby@marvin
253 reads

Deep Vs. Shallow Copying

by Marvin4mSeptember 19th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A stack and heap are different data structures used to store variables in memory. The pointer holds the location of where the actual data is stored, so we are just given a reference to it. It's about the speed compared to heaps, so instead of moving around a whole chunk of data(the heap) while mutating it, just carry the reference to the data. For static data types, variables are added directly onto the stack, meaning we would have no heap to store a simple 456.98 because the sizes of these sizes are already known.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Deep Vs. Shallow Copying
Marvin HackerNoon profile picture
Marvin

Marvin

@marvin

Software engineer. I write code and stay weird.

About @marvin
LEARN MORE ABOUT @MARVIN'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Marvin HackerNoon profile picture
Marvin@marvin
Software engineer. I write code and stay weird.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!