lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090108194638.GC24884@logfs.org>
Date:	Thu, 8 Jan 2009 20:46:38 +0100
From:	Jörn Engel <joern@...fs.org>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC] B+Tree library V2

On Thu, 8 January 2009 17:50:04 +0100, Johannes Berg wrote:
> 
> I see this:
> 
> 
> - * Second trick is to special-case the key "0" or NUL.  As seen above, this
> - * value indicates an unused slot, so such a value should not be stored in the
> - * tree itself.  Instead it is stored in the null_ptr field in the btree_head.
> 
> Does that mean that wasn't true, and I can store a 0 key?

Ahh, don't look at that!  The embarrassment is unbearable!  Go away!

Yes, I used to have a special exception for a 0 key.  But I also have
a special exception for a NULL value and can test against that instead
of testing against a 0 key.  It is even faster, because the value is not
variable-sized.  In hindsight it is hard to explain why I ever did that.

Jörn

-- 
Unless something dramatically changes, by 2015 we'll be largely
wondering what all the fuss surrounding Linux was really about.
-- Rob Enderle
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ