<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 9: preliminary fast POSITION</title><link>https://sourceforge.net/p/clisp/patches/9/</link><description>Recent changes to 9: preliminary fast POSITION</description><atom:link href="https://sourceforge.net/p/clisp/patches/9/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 18 Feb 2003 09:24:05 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/clisp/patches/9/feed.rss" rel="self" type="application/rss+xml"/><item><title>preliminary fast POSITION</title><link>https://sourceforge.net/p/clisp/patches/9/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The sequence functions carry an immense amount of &lt;br /&gt;
overhead. As a result, POSITION, COUNT etc. are much &lt;br /&gt;
slower than one would expect.&lt;/p&gt;
&lt;p&gt;I advocate that CLISP should recognize optimizable &lt;br /&gt;
cases and handle them internally. The time to test &lt;br /&gt;
internally at run-time for optimizable cases is &lt;br /&gt;
negligible compared to the full-blown sequence and &lt;br /&gt;
stepping overhead.&lt;/p&gt;
&lt;p&gt;Specifically, I advocate that CLISP handles optimizable &lt;br /&gt;
cases transparently and does not expose something like &lt;br /&gt;
EXT:VECTOR-POSITION. CLISP should encourage portable &lt;br /&gt;
code and thus use of POSITION etc., with guarantees &lt;br /&gt;
that it will be fast where it can be.&lt;/p&gt;
&lt;p&gt;Optimizable cases are, at a glance&lt;br /&gt;
o vector instead sequence (possibly only string or &lt;br /&gt;
unsigned-byte 8/16/32)&lt;br /&gt;
o and test EQ or EQL (or maybe CHAR= and = with &lt;br /&gt;
corresponding array element-type)&lt;br /&gt;
o with KEY #'IDENTITY&lt;br /&gt;
o :from-end is optimizable as well (means almost &lt;br /&gt;
duplicate code).&lt;/p&gt;
&lt;p&gt;So far, I only implemented string-position, ignoring &lt;br /&gt;
test and from-end. Maybe somebody will want to &lt;br /&gt;
continue work from this.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jörg Höhle</dc:creator><pubDate>Tue, 18 Feb 2003 09:24:05 -0000</pubDate><guid>https://sourceforge.netc45f6d9be1949b2ee1b6135889a9edc1f17e9b3c</guid></item></channel></rss>