webppl icon indicating copy to clipboard operation
webppl copied to clipboard

performance

Open robinjac opened this issue 8 years ago • 1 comments

Hi,

I'm considering using webppl with node for a project but I'm a bit worried that it might be slow compared to pyro/edward. How is the performance of webppl compared to other existing ppl?

robinjac avatar Jun 20 '18 20:06 robinjac

I think it will depend on the specifics of the model. Take the case of comparing the performance of variational inference in WebPPL and Pyro for example. If the model has mostly univariate random variables and the guide(/variational family) is pretty simple (e.g. mean-field) then WebPPL may be faster than Pyro. (Because in this setting I expect that the run time is dominated by book keeping which will probably be faster in JS than CPython.) On the other hand if the model has lots of multivariate variables and large neural guides then Pyro is going to be faster. (Because the run time will be dominated by operations on multi-dimensional arrays, which will be much faster with PyTorch, especially if you have a GPU.)

I should say that I've not actually tested this, but I have heard anecdotes to this effect. Also, I'm not familiar with Edward, so I can't comment on that.

null-a avatar Jun 21 '18 09:06 null-a