Ext3 uses tree to hold directory contents, so it's capability to handle large amount of files in single directory is better than of those file systems with linear directory listings. Here you can read the description of the tree used to keep directory contents.
This seems to have been answered at the below link.