<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hi Levente,<div><br></div><div>could you expand the method comment to refer to #at:ifAbsent: and the [nil] example?  Write it in a way that programmers do not end up using #atOrNil: + ifNil: without knowing better. :-)</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 19.07.2019 01:04:33 schrieb Chris Muller <ma.chris.m@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">Wow, +1 then.  Amazing how you're able find this kind of performance<br>improvement in as low-level a method as String>>#at:ifAbsent:.<br><br> - Chris<br><br>On Thu, Jul 18, 2019 at 5:58 PM Levente Uzonyi <leves@caesar.elte.hu> wrote:<br>><br>> On Thu, 18 Jul 2019, Chris Muller wrote:<br>><br>> > Is it faster even if the argument to ifAbsent: is simply "nil" instead of "[nil]"?<br>><br>> More than 4x faster when the index is valid and more than twice as fast<br>> when the index is not valid.<br>><br>> Levente<br>><br>> ><br>> > On Thu, Jul 18, 2019 at 5:13 PM <commits@source.squeak.org> wrote:<br>> >       Levente Uzonyi uploaded a new version of Collections to project The Inbox:<br>> >       http://source.squeak.org/inbox/Collections-ul.844.mcz<br>> ><br>> >       ==================== Summary ====================<br>> ><br>> >       Name: Collections-ul.844<br>> >       Author: ul<br>> >       Time: 19 July 2019, 12:08:51.94435 am<br>> >       UUID: df5ebfa9-4ebf-4505-8031-afd892a1061c<br>> >       Ancestors: Collections-mt.843<br>> ><br>> >       - added String >> #atOrNil: which uses primitive 63 and returns either the character at the given index or nil when the primtiive fails. This is a faster alternative to #at:ifAbsent: when the absent block would<br>> >       yield nil.<br>> ><br>> >       =============== Diff against Collections-mt.843 ===============<br>> ><br>> >       Item was added:<br>> >       + ----- Method: String>>atOrNil: (in category 'as yet unclassified') -----<br>> >       + atOrNil: anIndex<br>> >       +       "Return the character at anIndex or nil if the index or the argument is not valid."<br>> >       +<br>> >       +       <primitive: 63=""><br>> >       +       ^nil!<br>> ><br>> ><br>> ><br>> ><br><br></primitive:></commits@source.squeak.org></leves@caesar.elte.hu></div></blockquote>
                                        </div></body>