4x4 Matrix Keypad on Arduino UNO
Your general idea is correct - looping over columns to find out if one of them is active, and then only looping over the rows to find out which button was pressed will be somewhat faster (as in: more responsive) than checking each possible button separately.

If I were to suggest any improvements in the method - you could look into using pin change interrupts instead of busy looping. This would provide you with hardware support to detect when a pin goes LOW.
This would also allow you to put your arduino to sleep to save power while waiting for a button to be pressed.

You might also need to debounce the keypress since you can get momentary false readings from a switch. This would basically require a small delay (usually less than 100ms) after you detect a keypress, and then rechecking after the delay if that switch is still active.



the comments below are going beyond your question but I decided to add them for some perspective on coding style

As far as your code goes I would suggest putting the entire key-checking logic in a single function that uses local variables for your column and row counters. This primarily helps with reasoning about the code but also has a small positive effect on memory usage overall (memory on the stack will be reclaimed after a return from the function).

Instead of using magic numbers throughout your code you should use constants/macros. This has the benefit of giving the value a name, and having a single place that would require changing instead of multiple values that are not easily ctrl+f'able. Calculating array length can be automated. This eases adding changes further on, and helps enforce correctness by the compiler.

You should also declare your pin arrays as const if possible. This will make optimizing your code easier for the compiler.

A sample of how this would look together:

//define rows and columns
const byte row[] = {9,8,7,6};
const byte rowCount = sizeof(row) / sizeof(row[0]); //old C trick for calculating static array length
const byte col[] = {5,4,3,2};
const byte colCount = sizeof(col) / sizeof(col[0]);

const byte keys [ rowCount ] [ colCount ] =
{
    {0x1,0x2,0x3,0xA},
    {0x4,0x5,0x6,0xB},
    {0x7,0x8,0x9,0xC},
    {0xE,0x0,0xF,0xD}
};