Re: Performance assistance / advice
"Yuri Davidovsky (as work at disclosure dot ie)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
> On 11 Mar 2025, at 21:31, Tim Bradshaw (as tfb at cley dot com) <[email protected]> wrote: > > Well, this is actually my claim here: yes, like C fast. I am secretly hoping that some masochist will write a version of my algorithm in C, so I can verify this. Unfortunately, it won’t be the case in all situations. For example, as outlined above, gcc is quite good at automatic vectorisation, Lisps’ capabilities at that are rather rudimental at this point in time, as I understand. Additionally, when coding in C you can have access to intrinsics (wrapper functions for underlying CPU instructions) which can give you a bit of an edge when optimising for a specific platform, for example the rbit instruction on arm64 that does bit reversal and that is strangely not present on x64 and which can save a lot of cycles. Moreover, you do not even explicitly need to use the intrinsics, gcc can recognise the bit reversal algorithm patterns and employ the rbit instruction even without you knowing about its existence. At the moment such things are not possible in lisps, so in some cases inability to match C’s performance is going to be difficult to even explain, let alone to replicate. _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html