Extremely large Permissions table
No, Drupal isn't making a single DB call per checkbox - that would be suicide :)

Looking at user_role_permissions() should de-mystify the whole thing...all enabled permissions for the given roles (or all roles if none are provided), are lazy-loaded into memory when they're needed, and statically cached for the same request. 

It's about as efficient as it can possibly be when you consider how Drupal's permission system works - I doubt you'll be able to squeeze anything more out of it that wouldn't be considered pointless micro-optimising.

As an aside 50 roles is a lot. I've never seen a site with anywhere near that many; if you can reduce the number of those, you'll be doing yourself a great service.