piskvorky/gensim — pull request #139 by holopoj (2013-11-14 23:16:11+00:00)
Title: word2vec: Change total_words count from a function to a count

This speeds things up a lot when processing billions of total words. The function was getting called every 10,000 tokens and iterates over every vocabulary item. This change provides an equivalent calculation without the iteration over the vocab.