Hi all,
I am doing some experiments with the inner workings of the word2vec model.
When I implement my changes to the corresponding files (word2vec.py, word2vec_inner.pyx, word2vec_inner.pxd), create a C file (the exact commands I use are below) and compile it (below) I get a huge decrease in the performance.
I wanted to make sure whether the decrease is due to the changes I introduced. So I created a C file from original pyx and pxd files and compiled it. To my surprise this also led to a huge performance decrease.
For example, for the specific task I have, if I use a single worker, the shipped .so file performs in ~14.4s while the .so file I compiled executes in ~35s. Even worse, when I switch to multiple threads, the .so file I compiled executes in ~125s (!) compared to the original's 10s.
--
[python]
>> import Cython.Build
>> from setuptools import Extension
>> extension = Extension('word2vec_inner', sources=['word2vec_inner.pyx'], language='c', extra_compile_args=[])
>> Cython.Build.cythonize([extension], language_level=3)
[bash]
Any hints as to what I might be doing wrong is much appreciated.
Kind regards,
Ferhat