I agree with what starrsgirl said. Often times people study classes at different times, so you might think that someone knows everything or studies harder than you if they learned something that you haven't yet. You probably have studied things that that person hasn't, too.
I started falling into the trap of comparing myself to others, especially because a lot of the people who get A's or the people that I'm around often like to share their grades and ask how everyone did. Not in a competitive manner or to put anyone down, but it's definitely easy to not feel good when you know that others did better on tests.
Plus, you're getting A's! You should be so proud that you have a 4.0 right now, so keep doing what you're doing! It also feels like I'm trying to learn all the material for one test and then moving on, and I wish I had more time to focus on really retaining the information in the long run, but just remember that you're learning the basics right now. All your future classes will build upon what you're learning now, and that'll be the stuff that you remember. The 2nd year students don't remember a lot of the anatomy that we learn in the first year, and the 2nd year TA's have to look over their notes to prepare to teach us.
I'm also bummed about how much memorizing there is. I've used flashcards a LOT, but I've also learned by understanding probably more than I realize.