Opened 13 years ago
Closed 13 years ago
#560 closed enhancement (fixed)
Deprecate Xapian::weight in favour of double?
Reported by: | Olly Betts | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.0 |
Component: | Library API | Version: | |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
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.
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The subclassing thing I mentioned works fine.