Wahb bin Munabbih said: In my view, a gathering in which there is discussion about knowledge is more beloved and preferable to me than an equivalent amount of prayer, because perhaps someone may hear a word from it that will benefit him for a year or for the rest of his life.
Hadith Takhrijاس اثر کی سند صحیح ہے «وانفرد به الدارمي»۔
Brief Explanation
(Commentary on Hadiths 330 to 333)
This means that learning and teaching knowledge is better than voluntary (nafl) prayer, as its benefit extends to other people, whereas prayer is only beneficial for oneself.