Comparative numerical studies of ideal magnetohydrodynamic instabilities