percyliang / brown-cluster

C++ implementation of the Brown word clustering algorithm.
424 stars 136 forks source link

Speed up with compiler optimization #6

Open SimonSuster opened 10 years ago

SimonSuster commented 10 years ago

In case anyone is clustering large datasets:

in my experiments (40M corpus and NofClusters=1000), turning on compiler optimization with "-O3" yields speed-ups of around 3.

I changed the following lines in my Makefile:

wcluster: $(files)
    g++ -Wall -g -O3 -o wcluster $(files)

%.o: %.cc
    g++ -Wall -g -O3 -o $@ -c $<
percyliang commented 10 years ago

I'm surprised I didn't have it in there before. It's added now - thanks for the note!

-Percy

On Thu, Sep 5, 2013 at 4:57 AM, Simon Suster notifications@github.comwrote:

In case anyone is clustering large datasets:

in my experiments (40M corpus and NofClusters=1000), turning on compiler optimization with "-O3" yields speed-ups of around 3.

I changed the following lines in my Makefile:

wcluster: $(files)

g++ -Wall -g -O3 -o wcluster $(files)

%.o: %.cc g++ -Wall -g -O3 -o $@ -c $<

— Reply to this email directly or view it on GitHubhttps://github.com/percyliang/brown-cluster/issues/6 .