How do you handle lots of entities with no lag?

I was watching this video when i couldn’t seem to figure out how he did it?