I'm not entirely sure yet what sub-branch of my field I want to pursue later and what I would like is to have as many internships as possible while I am a student, to get a feel for how different companies work.
This is a great reason to do internships at different companies. You should most definitely do experiences in different fields - at nearly no other time in your career can you have the flexibility you can have during internships.
Companies have a shared interest with you. They want to hire people who are competent at jobs they like doing. You want to do jobs you like doing (and get paid :).
My question is, how would employers' perception of me be affected if I end up jumping from company to company (as a student)? Is it a good idea for me to get experience in a variety of fields? How much should I be worried about being perceived as someone who cannot commit for longer periods of time?
As an student, it's expected you will take internships. It's also well known by companies these are temporary employments. There is no negative perception in having multiple internships from different companies because of this.
Some thoughts regarding internships:
- Employers/interviewers expect students (especially in technical fields, like engineering/software) to do internships
- If you intern with the same company more than once, there often is an implied "I want to work here after I graduate" thought - why would you do this again if you didn't want to work there after you graduate?
- People are unlikely to ask details as to why you chose different internships
- More internship experience lets you have a much richer set of experiences to talk about in interviews because it helps you know what you are looking for (or want to avoid) in jobs and companies
- Doing the same internship twice in a row is not the best idea unless you are sure you want to do that job after graduation (or cannot find something else...) because you never again will have the flexibility to try out different jobs the way you can with internships**
You are by far worrying about something which is not worth worrying about. Take internships you think you would enjoy or find professionally fulfilling and don't worry about how they appear on your resume.
**by this I mean effectively doing the same internship with the same group and very similar work