On Wed, Jan 5, 2011 at 4:10 PM, Marcelo Barbudas <nostef at gmail.com>
wrote:> Hi,
>
> We're using R in an application where asking for a probability of an
> event takes about 130ms.
>
> What could we do to take that down to 30ms-40ms? The query code uses
> randomforest, knn.
>
That's a fairly vague question.... So some vague answers:
Firstly, profile your query to identify bottlenecks and then
concentrate your effort on removing them. Anything else is a waste of
time.
Secondly, get a faster computer - whether that means faster CPU,
faster hard disks, faster RAM depends on where the bottleneck is in
your process. Or get parallel and use multiple CPUs. Or rewrite in C.
Or machine code. Or do it on a GPU.
Thirdly, give us something more specific! Like examples perhaps?
Barry