[Xapian-tickets] [Xapian] #560: Deprecate Xapian::weight in favour of double?

Xapian nobody at xapian.org
Sat Aug 6 07:44:30 BST 2011


#560: Deprecate Xapian::weight in favour of double?
-------------------------+--------------------------------------------------
 Reporter:  olly         |       Owner:  olly 
     Type:  enhancement  |      Status:  new  
 Priority:  normal       |   Milestone:  1.3.0
Component:  Library API  |     Version:       
 Severity:  normal       |   Blockedby:       
 Platform:  All          |    Blocking:       
-------------------------+--------------------------------------------------
 For Xapian::docid, etc having dedicated types is definitely good - it
 allows rebuilding to allow more than 4 billion documents, as well as side-
 stepping portability issues with integer type sizes.

 But for weights, it doesn't make much sense to rebuild with Xapian::weight
 being anything other than double.  You don't need the extra precision of
 long doubles, while floats are likely to be the same speed or slower on
 anything vaguely modern, and probably a bit low precision.

 I brought this up on IRC and Richard agreed it seemed sensible.

 One thing which might shoot down this idea - if you can't subclass and
 reimplement a virtual method using Xapian::weight where the parent class
 uses double, it's going to be hard to provide a smooth migration path.

-- 
Ticket URL: <http://trac.xapian.org/ticket/560>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list