# Objects

## Introduction

### Integer caching

If we set $$x=2$$ we can either create $$2$$ in memory, or simply point $$x$$ to $$2$$, which is already in memory

That means if we do $$x=2$$ $$y=2$$ they have the same pointer.

Can also cache some other common data values, eg empty lists.

Makes sense if pointer is smaller in memory than value.