Leeheng86/word2vec

distance.c - fread'ing all vector floats at once boosts loading speed by ~3x...

Opened this issue · 0 comments

replacing:
    for (a = 0; a < size; a++) fread(&M[a + b * size], sizeof(float), 1, f);

with:
    fread(&M[b * size], sizeof(float), size, f);

Greatly increases loading speed.

Original issue reported on code.google.com by chad.p...@gmail.com on 21 Jul 2015 at 5:01