Re: The myth of fingerprints, er, no, garbage collectors

"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]> Sun, 28 Jun 2026 11:24:45 -0700
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
--Apple-Mail=_D10154C1-3F95-4839-8A1F-761B7C70F553
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Taking a real-world example directly from my lab - loudness monitoring =
of stereo audio. Incoming signals are single precision FP, one for left =
and the other for right.

To detect True Peak levels, I need to interpolate these signals from 48 =
kHz to 192 kHz sample rate (x4), then look for the peak level within =
each incoming block. The interpolating filter is a 12-tap FIR filter =
that I run against both channels together, using SIMD instructions.

The data come from two separate FP arrays and need to be combined into =
paired up entries suitable for the SIMD engine. Similar to the =
interleaved audio recording format on external storage, or live audio =
streaming to the computer. But the system (Apple=E2=80=99s AudioUnits) =
does the separation of the left/right channels. That isn=E2=80=99t up to =
me.

So I could do the interleaving in Lisp before calling on my C SIMD FIR =
filtering, or else I do it in C. Either way, the interleave formatted =
arrays exist only for the purpose and duration of computing the FIR =
interpolated streams and Max eval.

- DM

> On Jun 28, 2026, at 10:34, Yuri Davidovsky (as work at disclosure dot =
ie) <[email protected]> wrote:
>=20
>=20
>=20
>> On 28 Jun 2026, at 19:16, Tim Bradshaw <[email protected]> wrote:
>>=20
>> I'm wondering now if I could persuade SOA to do that. =20
>=20
> You do not really need to, if you keep each field in a separate array, =
this is in fact the easiest approach to make things SIMDable.=20
>=20
>> If someone does know of some non-hideous C-level  SIMD interfaces for =
macOS (or, probably easier, linux but they would need to be friendly to =
SBCL / CFFI there) I would be interested.
>=20
> https://developer.apple.com/documentation/accelerate/vdsp-library
> The docs use Swift for examples, but the library has C headers =
included.=20


--Apple-Mail=_D10154C1-3F95-4839-8A1F-761B7C70F553
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" =
content=3D"text/html; charset=3Dutf-8"></head><body =
style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;">Taking a real-world example directly =
from my lab - loudness monitoring of stereo audio. Incoming signals are =
single precision FP, one for left and the other for =
right.<div><br></div><div>To detect True Peak levels, I need to =
interpolate these signals from 48 kHz to 192 kHz sample rate (x4), then =
look for the peak level within each incoming block. The interpolating =
filter is a 12-tap FIR filter that I run against both channels together, =
using SIMD instructions.</div><div><br></div><div>The data come from two =
separate FP arrays and need to be combined into paired up entries =
suitable for the SIMD engine. Similar to the interleaved audio recording =
format on external storage, or live audio streaming to the computer. But =
the system (Apple=E2=80=99s AudioUnits) does the separation of the =
left/right channels. That isn=E2=80=99t up to =
me.</div><div><br></div><div>So I could do the interleaving in Lisp =
before calling on my C SIMD FIR filtering, or else I do it in C. Either =
way, the interleave formatted arrays exist only for the purpose and =
duration of computing the FIR interpolated streams and Max =
eval.</div><div><br></div><div>- DM<br =
id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote =
type=3D"cite"><div>On Jun 28, 2026, at 10:34, Yuri Davidovsky (as work =
at disclosure dot ie) &lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div><meta http-equiv=3D"content-type"=
 content=3D"text/html; charset=3Dus-ascii"><div dir=3D"auto"><div =
dir=3D"ltr"></div><div dir=3D"ltr"><br></div><div =
dir=3D"ltr"><br><blockquote type=3D"cite">On 28 Jun 2026, at 19:16, Tim =
Bradshaw &lt;[email protected]&gt; =
wrote:<br><br></blockquote></div><blockquote type=3D"cite"><div =
dir=3D"ltr"><div>I'm wondering now if I could persuade SOA to do that. =
&nbsp;</div></div></blockquote><div><br></div><div>You do not really =
need to, if you keep each field in a separate array, this is in fact the =
easiest approach to make things SIMDable.&nbsp;</div><br><blockquote =
type=3D"cite"><div dir=3D"ltr"><div>If someone does know of some =
non-hideous C-level &nbsp;SIMD interfaces for macOS (or, probably =
easier, linux but they would need to be friendly to SBCL / CFFI there) I =
would be interested.</div></div></blockquote><br><div><div =
style=3D"display: block;"><div style=3D"-webkit-user-select: all; =
-webkit-user-drag: element; display: inline-block;" =
class=3D"apple-rich-link" draggable=3D"true" role=3D"link" =
data-url=3D"https://developer.apple.com/documentation/accelerate/vdsp-libr=
ary"><a style=3D"border-radius:10px;font-family:-apple-system, =
Helvetica, Arial, =
sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:=
none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;t=
ext-decoration:none;" class=3D"lp-rich-link" rel=3D"nofollow" =
href=3D"https://developer.apple.com/documentation/accelerate/vdsp-library"=
 dir=3D"ltr" role=3D"button" draggable=3D"false" width=3D"300"><table =
style=3D"table-layout:fixed;border-collapse:collapse;width:300px;backgroun=
d-color:#1B1B1B;font-family:-apple-system, Helvetica, Arial, =
sans-serif;" class=3D"lp-rich-link-emailBaseTable" cellpadding=3D"0" =
cellspacing=3D"0" border=3D"0" width=3D"300"><tbody><tr><td =
vertical-align=3D"center" align=3D"center"><span =
id=3D"cid:1DD5AC0A-559C-4ED8-88AB-A0C8A95CC79E">&lt;developer-og.jpg&gt;</=
span></td></tr><tr><td vertical-align=3D"center"><table =
bgcolor=3D"#1B1B1B" cellpadding=3D"0" cellspacing=3D"0" width=3D"300" =
style=3D"table-layout:fixed;font-family:-apple-system, Helvetica, Arial, =
sans-serif;background-color:rgba(27, 27, 27, =
1);-apple-color-filter:initial;" =
class=3D"lp-rich-link-captionBar"><tbody><tr><td style=3D"padding:8px =
0px 8px 0px;" class=3D"lp-rich-link-captionBar-textStackItem"><div =
style=3D"max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" =
class=3D"lp-rich-link-captionBar-textStack"><div =
style=3D"word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidd=
en;text-overflow:ellipsis;text-align:left;" =
class=3D"lp-rich-link-captionBar-textStack-topCaption-leading"><a =
rel=3D"nofollow" =
href=3D"https://developer.apple.com/documentation/accelerate/vdsp-library"=
 style=3D"text-decoration: none" draggable=3D"false"><font =
color=3D"#FFFFFF" style=3D"color: rgba(255, 255, 255, 1);">vDSP | Apple =
Developer Documentation</font></a></div><div =
style=3D"word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidd=
en;text-overflow:ellipsis;text-align:left;" =
class=3D"lp-rich-link-captionBar-textStack-bottomCaption-leading"><a =
rel=3D"nofollow" =
href=3D"https://developer.apple.com/documentation/accelerate/vdsp-library"=
 style=3D"text-decoration: none" draggable=3D"false"><font =
color=3D"#FFFFFF" style=3D"color: rgba(235, 235, 245, =
0.6);">developer.apple.com</font></a></div></div></td></tr></tbody></table=
></td></tr></tbody></table></a></div></div><br></div><div>The docs use =
Swift for examples, but the library has C headers =
included.&nbsp;</div></div></div></blockquote></div><br></div></body></htm=
l>=

--Apple-Mail=_D10154C1-3F95-4839-8A1F-761B7C70F553--

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html