Analogies have long been proposed as a valuable teaching mechanism, but the question of whether student-generated analogies are more effective for learning compared to those generated by the instructor has not been answered. We compare three different treatments: no provided analogy, an analogy provided by the instructor, and analogies generated by students during an in-class exercise. We apply these treatments to two upper-division computer science courses–Operating Systems (OS) and Programming Languages (PL)–and evaluate student learning. Our findings show that any effect of these different treatments on student learning is minimal. We found no practical or statistically significant differences between them. Anecdotally, the student-generated analogies provided an active learning activity and the instructor-provided analogies were the only ones mentioned in written responses to graded events. Given the small differences in learning, instructors can select the treatment based on the needs of the lesson; for example, selecting the student-generated option for active learning or the instructor-provided option when time is short.