When I was in high school, I went to a school with over 3,000 students. Learning everyone's name was impossible. I got through it by saying "Hi!" Or "Hey!" Or saying anything to avoid saying anyone's name I didn't know. But, somehow they all knew my name.
Which has led to some awkward situations 20 years later. Whenever I run into someone from high school, they recognize me (I haven't changed much) and remember my name. Whereas with me, I have no idea who they are, I don't remember what they looked like, I can't recognize them, and I still have no idea what their name is. "Remember me from ____ class?" That's the point where I'm like "Oh yeah!!!!" while lying through my teeth.
Ouch! My HS was much smaller, only about 500 students. About ten years ago I met my former homeroom teacher and she recognized me. She must've taught hundreds of students after I graduated. I did recognize her too, although it took a while for the penny to drop... And I had changed more in the intervening years than she had, she'd just gone gray but I'd gained 50 lbs.