Are these ratings binary, range-based or real? How many items and how many users do you have? All the details are important.
For example, range-based (e.g. 1-5 stars for a movie on Netflix) and real (e.g. normalized number of times a user listened to a singer on Last.fm) ratings work well with cosine distance, but binary data (e.g. number of likes on Facebook or products bought on Amazon) often gives better results with Jaccard distance.
If you have only a thousand users in 100Mb of data, simple iterative CF will work, but for millions of users and gigabytes of data you will have to use databases / data structures for quick neighbor retrieval.
Or change the algorithm. For instance, if you have enough memory, you can factorize user-item matrix and find latent components. If your data is binary and not very sparse, you can also use RBM.
Finally, if you want to recommend GitHub projects to users based on their “stars”, most likely none of the above will work - a better approach may be to use item-based recommendation systems (based on similarity between projects, not users) or even some custom regression-based sorting.
All of the above is easy to implement, but performance differs significantly depending on use case.