Undergraduate* research assistant vs. teaching assistant experience: for Masters application

Generally, what experience matters the most when it comes to Masters application? (computer science)

Personally, I have done both. However, I feel that the teaching assistant experience has been better for me as I had to fill in the shoes of a graduate student despite being a undergraduate - held office hours weekly, assisted students, graded programming assignments, tests, homework, quizzes (100/150 students) for a core course in my major.

As a researcher, my job was more of a student worker.

Why are you asking? Are you trying to decide whether to repeat one or the other next year?

Research experience, almost always. If it’s an academic program, it’ll definitely be research experience. If it’s a professionally-oriented program, it still would probably be research experience.

The point is not whether you are filling the shoes of a graduate student - it’s the kind of tasks and skills you learned along the way. Frankly, for most academic programs that are focused on research/scholarship, grading students and giving tests and quizzes aren’t nearly as valuable as learning to work closely with a professor on a research project, learning about the research process, getting exposed to the way academic science is done, etc.