mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: Why do userid & itemid have to be long?
Date Wed, 01 Jun 2011 07:40:33 GMT
It is for performance -- it used to allow any Comparable type but the object
overhead slowed things down by 2-3x.
It looks like you are using integer values already in Mongo, am I reading
that right? those look like 12-byte hex values. Is it a question of
reading/writing them as such then rather than treating as strings in Mongo?
If you really have to convert such a thing to/from String, I bet that
writing your own simple encoder/decoder runs much faster.

On Wed, Jun 1, 2011 at 3:50 AM, Mike Khristo <mikekhristo@gmail.com> wrote:

> Rather, how can I use string-based userid/itemid's without having the deal
> with the slowness associated with mapping them to a long?
>
> In the MongoDataModel, for example, significant time/overhead goes into
> converting the unique id's to long...  I'm still getting my head wrapped
> around mahout, but this seems like a significant limitation. I have to
> assume there's some logic behind the decision to restrict them to long, but
> i didn't find anything about it in Mahout in Action or the list.
>
> Thanks.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message