title: How is a Hashmap passed into a function internally?
body: <p>When you pass an array into a function, then, as far as I know, you are really just passing the address of the first element to the function. This is cool because it means that the function is called super quickly since not all elements in the array must be copied.</p>
  <p>I was wondering how a Hashmap is passed to a function. Does the compiler make a copy of the entire Hashmap, looping over all elements in the process? Or does the compiler see the Hashmap as an array plus the Hash function, i.e. one only passes the address of the first element of the underlying array? Or does something entirely different happen?</p>
  <p>I made some quick tests and it seems that when I call the Hashmap in a function it is about 5% slower than if I do the same operations directly. That's not much so I guess it works like an array but I am not sure.</p>
  <p>Edit: I messed up the test a little. Now it seems to take about twice the time</p>