In the Java API documentation there is a note saying that
The version (getActualMaximum()) of this function on Calendar uses
an iterative algorithm to determine the actual maximum value for the field.
There is almost always a more efficient way to accomplish this
(in most cases, you can simply return getMaximum()).
GregorianCalendar overrides this function with a more efficient implementation. So
it looks like it's a lot more efficient to call getActualMaximum from a GregorianCalendar
object than a Calendar object. (Thanks to P. Harris for the tip)