<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Luis,</p>
<p>You are right in thinking that the time is going into the Transcript.</p>
<p>For both Cuis and Squeak, a better approach is to collect your test results without interacting with the Transcript, like this:</p>
<p><br /></p>
<p style="padding-left: 40px;">| results startTime elapsed potentialPrimes limit |<br />results := OrderedCollection new. "Collect test results in a collection, not in the Transcript"</p>
<p style="padding-left: 40px;">startTime := Time millisecondClockValue.</p>
<p style="padding-left: 40px;">limit := 100.<br />potentialPrimes := Array new: limit.<br />potentialPrimes atAllPut: true.</p>
<p style="padding-left: 40px;">2 to: limit sqrt floor do: [:testNumber |<br />    (potentialPrimes at: testNumber) ifTrue: [<br />        (testNumber squared) to: limit by: testNumber do: [:nonPrime |<br />            potentialPrimes at: nonPrime put: false<br />        ]<br />    ]<br />].</p>
<p style="padding-left: 40px;">2 to: limit do: [:testNumber |<br />    (potentialPrimes at: testNumber) ifTrue: [<br />        "Transcript show: testNumber asString; cr"<br />    results add: testNumber.<br />    ]<br />].</p>
<p style="padding-left: 40px;">elapsed := Time millisecondClockValue - startTime.<br />results add: elapsed.<br />"After the test is complete, you can show the results in Transcript"<br />results allButLast do: [ :e | Transcript show: e asString; cr ].<br />Transcript show: elapsed printString; show: ' ms'; cr. <br />results inspect.</p>
<p><br /></p>
<p>HTH,</p>
<p>Dave</p>
<div id="signature"></div>
<p><br /></p>
<p id="reply-intro">On 2026-10-10 09:36, Luis Mendes via Cuis-dev wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi,<br /><br /><br />I'm evaluating Cuis as a programming language for my use.<br />Smalltalk seems like a great environment to program.<br />But I need that programs can execute fast.<br /><br />I did some non-rigorous benchmark to some languages for a CPU intensive<br />operation.<br />The language that I've been using is Tcl.  It's slow for some kind of<br />operations, and I will need a language that can go through lots of data.<br /><br />Used Python just because it is so popular.<br /><br />Used Euphoria because it's a simple language that runs fast.  Faster<br />yet when translated to C, but I didn't test the speed after this<br />operation.<br /><br />Also tested Icon because it's compiled, has great tools for text<br />related operations, and can also run on MS-DOS, as can Euphoria, in<br />case I decide to also use this focused environment to program.<br /><br />For the Erathostenes code found on Rosettacode, these are the results I<br />got:<br /><br />1.000.000 times                milliseconds<br /><br />eratosthenes2.eu              70<br />eratosthenes2.eu              90<br />eratosthenes_generator.py         114<br />eratosthenes_array.py             121<br />eratosthenes_set.py                  253<br />eratosthenes.icn                 700<br />eratosthenes_sets.icn             580<br />eratosthenes.tcl            2112<br />eratosthenes2.tcl            4792<br />cuis 5.0 2021               27472<br />cuis 7.9 2026                2093<br />squeak6.2 alpha 24031               66<br /><br /><br />The Smalltalk code used was this one:<br /><br />| startTime elapsed potentialPrimes limit |<br />startTime := Time millisecondClockValue.<br /><br />limit := 100.<br />potentialPrimes := Array new: limit.<br />potentialPrimes atAllPut: true.<br /><br />2 to: limit sqrt floor do: [:testNumber |<br />    (potentialPrimes at: testNumber) ifTrue: [<br />        (testNumber squared) to: limit by: testNumber do: [:nonPrime |<br />            potentialPrimes at: nonPrime put: false<br />        ]<br />    ]<br />].<br /><br />2 to: limit do: [:testNumber |<br />    (potentialPrimes at: testNumber) ifTrue: [<br />        Transcript show: testNumber asString; cr<br />    ]<br />].<br /><br />elapsed := Time millisecondClockValue - startTime.<br />Transcript show: elapsed printString; show: ' ms'; cr.<br /><br /><br />What I found is that printing the numbers in a window is very slow for<br />Cuis, maybe the difference is entirely related to it.<br />Something like 60-70 ms, like in Squeak would be great.<br /><br />Any comments?<br /><br />Thank you,<br /><br /><br />Luís Mendes</div>
</blockquote>
</body></html>