🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.tcl
Article #80

Re: Announce bitarray 1.0 - packed integer arrays for Tcl 9 (C extension)

#80
From: Olivier
Date: Thu, 22 Oct 2026 09:16
25 lines
2273 bytes
et99 <et99@rocketship1.me> posted:

> 
> 
> The bitarray C extension stores arrays of small integers (1, 8, 16, 32 or 64 bits, signed or unsigned) packed in memory that looks and behaves like an ordinary Tcl list. To the rest of Tcl a bitarray IS a list: lindex, lset, lrange, lreplace, linsert, foreach, "in", lsort, lsearch, join, {*}$a all work on a bitarrary.
> 
> .....
> 
> They work a 64-bit word at a time, and the logical and relational operators use SSE2 for the 8-, 16- and 32-bit widths on x86-64 (on by default; one build switch turns it off). The table below is one million elements, microseconds per call, measured on Windows with Visual C++ /O2 against the same job done on a plain list with an ordinary Tcl loop. The numbers are from running extras/listbench.tcl on a Windows run.
> 
>      operation                         plain list     bitarray    speed-up-approx
>      a AND b (1-bit arrays)                87,347          7.9       11,000x
> ....
>      "> 1000" on a 16-bit array           250,769          315          800x
> 
> Questions, bug reports and criticism are welcome. Mit Licence.
> 
> -Eric
>  

It seems astonishing, almost incredible, especially for the use on digital signals or
analog signals (after being converted to integer). What are land, lnot ...?
Are they just mnemonics you used for your explanations ? 

Olivier.
Technical Details
Message-ID: <1792660578-1108@newsgrouper.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
References: <11bb56j$8k4k$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
From: Olivier <user1108@newsgrouper.org.invalid>
Newsgroups: comp.lang.tcl
Subject: Re: Announce bitarray 1.0 - packed integer arrays for Tcl 9 (C extension)
References: <11bb56j$8k4k$1@dont-email.me>
Date: Thu, 22 Oct 2026 09:16:18 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1792660578-1108@newsgrouper.org>
Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user1108
Injection-Date: Thu, 22 Oct 2026 09:16:18 GMT
User-Agent: Newsgrouper/0.9.0
Organization: tcltk@vivaldi.net