Unless your code includes "heavy" calculations the difference in performance will not be significant (assuming that the code is efficient, libraries should run faster).
The advantages of using a module is that it will be easier to debug and easier to update as needed.
Libraries should mostly be used to access features which are not accessible directly from Basic4ppc.