snap-stanford / snapvx

Other
65 stars 34 forks source link

use shared dictionaries instead of arrays; clean up a little bit #32

Closed bkj closed 7 years ago

bkj commented 7 years ago

I was profiling this on a problem I'm working on, and I noticed that in the ADMM_z step, ~90% of the time was spent in the writeObjective function. I changed the shared data structure to a dictionary instead of an array, which speeds that step up quite a bit (and simplifies things a little bit, IMO). On my benchmark, runtime dropped from 80s to 47s, so a nontrivial speedup.

davidhallac commented 7 years ago

Great suggestion! Yes, that does seem to speed things up quite a bit.

Thanks! David