On Mon, Sep 30, 2013 at 09:22:15PM +0300, Sergey Popovich wrote: > * Add minor optimisations on speed when comparing with int_cmp(), > uint_cmp(), u64_cmp(), by removing branching.
Applied, thanks. Although i replaced return (i1 > i2) - (i1 < i2); by return (int)(i1 > i2) - (int)(i1 < i2); Former depends on proper overflow when uint is converted to int, which would probably works (as we use -fno-strict-overflow). > * Reorder type checks in val_compare() and val_in_range(). I skipped this as i simplified set matching in val_in_range() anyways. val_in_range() could be changed to use switch based on the type of the second argument, question is whether efficiency gains are large enough to outweight loses in readability. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
signature.asc
Description: Digital signature