Finally, I have some time to revisit the N queens problem using bit operations.

The following functions could solve 11 queens in 1 second:

So far to me, this is the most efficient algorithm for N queens.

8-queens

The code is mostly self-explenary. Please comment if anything cannot be understood.