<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 511: compile-time optimization: EVALUATE single-var TO switch</title><link>https://sourceforge.net/p/gnucobol/feature-requests/511/</link><description>Recent changes to 511: compile-time optimization: EVALUATE single-var TO switch</description><atom:link href="https://sourceforge.net/p/gnucobol/feature-requests/511/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 03 Feb 2026 17:22:28 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/gnucobol/feature-requests/511/feed.rss" rel="self" type="application/rss+xml"/><item><title>compile-time optimization: EVALUATE single-var TO switch</title><link>https://sourceforge.net/p/gnucobol/feature-requests/511/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;There are at least 3 reasonable optimizations:&lt;/p&gt;
&lt;p&gt;1: translate &lt;code&gt;EVALUATE pic-x1-item  WHEN 'a'...&lt;/code&gt; to &lt;code&gt;switch (pic-x1-data) {case 'a'}&lt;/code&gt;&lt;br/&gt;
2: internally do that for &lt;code&gt;EVALUATE TRUE&lt;/code&gt; when all elements are 88-condition-names for the same variable&lt;/p&gt;
&lt;p&gt;this would be a minor performance update, mostly generating "nicer code" than the current one&lt;/p&gt;
&lt;p&gt;3: optional: do something similar for pic-xN-items (possibly with N &amp;lt;=3/9/???) using a switch for each position - but that would need a go to label to reach the WHEN OTHER/end position within the inner &lt;code&gt;default&lt;/code&gt; case - but then... we likely have at least the end label for the current generation of &lt;code&gt;if (memcmp(...))&lt;/code&gt; already&lt;/p&gt;
&lt;p&gt;This would be a bigger optimization for commonly executed comparisons of "status" and "type" fields which may be longer.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Simon Sobisch</dc:creator><pubDate>Tue, 03 Feb 2026 17:22:28 -0000</pubDate><guid>https://sourceforge.netb75cde761073ac007a22ae81b21d5566b15cb901</guid></item></channel></rss>