I like to make things complicated and so I want to point out that quaternion slerp may be the right or the wrong way to go. It depends on what you want to reach. Your interpolation is done for keyframe animation of skeletons. Therein are 2 possible purposes for interpolation:
(1) "intra-track interpolation" is done to yield in an intermediate value between 2 samples on the same track
(2) "inter-track interpolation" is done to yield in blending of animations
Now, slerp has a constant speed over the arc, since in fact the angle is interpolated. That guarantees a smooth motion. However, when a keyframe is crossed, a sudden change is introduced into the motion. This is a fact as long as any linear interpolation is used (slerp, nlerp) since linear interpolations provide only continuity in location, not in speed (notice please that the constant speed of slerp is only on the arc segment, not when going to the next segment). Due to this you may decide that constant speed over the arc is questionable, and may go with the nlerp instead (which is easier to implement and faster in processing).
The nlerp doesn't show constant speed, but it has the advantage of being commutative (the slerp isn't commutative). For case (1) commutativity plays no role, since you can ever interpolate "naturally" from the sample with the lower timestamp to the one with the greater timestamp, even if you would play the animation backwards. However, for case (2) commutativity plays a role: The overall animation will look different if you blend animation A with B or else animation B with A. In other words, if the blending depends on the order, you impose your artist to think about that, and you need to implement a guarantee to get always the prescibed order. Hence, IMHO nlerp would be the better way for case (2).