<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hi Fabio!<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Am I reading this wrong, or is after worse than before?</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Huh? Of course it is a little bit worse. I am proposing an extension hook for pragma parsing here. :-) The goal is to make the overhead as thin as possible.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">"=== BEFORE ===" means Compiler-mt.435 in Trunk.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">"=== AFTER ===" means Compiler-mt.437 in Inbox but with the Hook enabled, which would allow me to extract FFI-specific parsing code to the FFI-Kernel package.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">That's why my examples parse only some methods that have pragmas in them. There is no impact on parsing methods that do not have any pragmas.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></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 13.06.2020 12:36:26 schrieb Fabio Niephaus <lists@fniephaus.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 13 Jun 2020 at 11:17 am, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id="m_-6294377689839082684__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        <div>Hi all!</div><div><br></div><div>Here are some benchmarks. Same context as here:</div><div><a href="http://forum.world.st/The-Inbox-ShoutCore-mt-78-mcz-tp5118289p5118351.html" target="_blank"><span style="font-size: 10pt">http://forum.world.st/The-Inbox-ShoutCore-mt-78-mcz-tp5118289p5118351.html</span></a><br></div><div><br></div><div>=== BEFORE ===</div><div><br></div><div>{</div><div>   "FFITestLibrary>>ffiPrintString:":[</div><div>      "39,800 per second. 25.1 microseconds per run. 7.5 % GC time.",</div><div>      "41,600 per second. 24 microseconds per run. 3.72 % GC time.",</div><div>      "40,800 per second. 24.5 microseconds per run. 3.92 % GC time."</div><div>   ],</div><div>   "BitBlt>>copyBits":[</div><div>      "5,610 per second. 178 microseconds per run. 2.26 % GC time.",</div><div>      "5,590 per second. 179 microseconds per run. 2.65947 % GC time.",</div><div>      "5,550 per second. 180 microseconds per run. 2.95941 % GC time."</div><div>   ],</div><div>   "ExternalPoolReadWriter>>fetchFromFile":[</div><div>      "25,800 per second. 38.7 microseconds per run. 2.9794 % GC time.",</div><div>      "25,800 per second. 38.8 microseconds per run. 3.19936 % GC time.",</div><div>      "26,000 per second. 38.5 microseconds per run. 3.14 % GC time."</div><div>   ],</div><div>   "Win32Pool class>>winver":[</div><div>      "16,100 per second. 62 microseconds per run. 3.65927 % GC time.",</div><div>      "16,200 per second. 61.7 microseconds per run. 3.66 % GC time.",</div><div>      "16,100 per second. 62 microseconds per run. 3.52 % GC time."</div><div>   ]</div><div>}</div><div><br></div><div>=== AFTER ===</div><div><br></div><div>{</div><div>   "FFITestLibrary>>ffiPrintString:":[</div><div>      "37,200 per second. 26.8 microseconds per run. 7.4785 % GC time.",</div><div>      "37,800 per second. 26.4 microseconds per run. 6.77864 % GC time.",</div><div>      "37,400 per second. 26.7 microseconds per run. 7.16 % GC time."</div><div>   ],</div><div>   "BitBlt>>copyBits":[</div><div>      "5,140 per second. 195 microseconds per run. 8.04 % GC time.",</div><div>      "5,220 per second. 192 microseconds per run. 8.22 % GC time.",</div><div>      "5,270 per second. 190 microseconds per run. 8.22 % GC time."</div><div>   ],</div><div>   "ExternalPoolReadWriter>>fetchFromFile":[</div><div>      "24,000 per second. 41.7 microseconds per run. 9.43811 % GC time.",</div><div>      "23,900 per second. 41.9 microseconds per run. 9.25815 % GC time.",</div><div>      "23,500 per second. 42.6 microseconds per run. 9.3 % GC time."</div><div>   ],</div><div>   "Win32Pool class>>winver":[</div><div>      "13,900 per second. 72.1 microseconds per run. 8.88 % GC time.",</div><div>      "13,700 per second. 73 microseconds per run. 8.58 % GC time.",</div><div>      "13,800 per second. 72.6 microseconds per run. 8.7 % GC time."</div><div>   ]</div><div>}</div></div></blockquote><div dir="auto"><br></div><div dir="auto">Am I reading this wrong, or is after worse than before?</div><div dir="auto"><br></div><div dir="auto">Fabio</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id="m_-6294377689839082684__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000"><div></div><div><br></div><div>Best,</div><div>Marcel</div><div></div>
                                        
                                        <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:#aaaaaa;margin-top:10px">Am 13.06.2020 11:01:53 schrieb <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">A new version of Compiler was added to project The Inbox:<br><a href="http://source.squeak.org/inbox/Compiler-mt.437.mcz" target="_blank">http://source.squeak.org/inbox/Compiler-mt.437.mcz</a><br><br>==================== Summary ====================<br><br>Name: Compiler-mt.437<br>Author: mt<br>Time: 13 June 2020, 11:01:44.448351 am<br>UUID: ca2e1da8-da26-a840-ae3e-1822ce8ba67d<br>Ancestors: Compiler-mt.436<br><br>Speed-up method-based hook for custom pragma-parsing methods. Like in ShoutCore-mt.79<br><br>=============== Diff against Compiler-mt.436 ===============<br><br>Item was changed:<br>  ----- Method: Parser>>pragmaStatement (in category 'pragmas') -----<br>  pragmaStatement<br>        "Read a single pragma statement. Dispatch to the first available pragma parser using the current token as a simple getter to be called on self. If no pragma parser can be found, parse it as usual in the keywords form.<br>        <br>      Note that custom pragma parsers need to fulfill two requirements:<br>             (1) method selector must match the current token as simple getter,<br>                            e.g., <u></u> matches #apicall or <u></u> matches #primitive<br>                  (2) method must declare <u></u> to be called.<br>     This is for the protection of the parser's (message) namespace."<br>         <br>+         | parserSelector |<br>-   | parserSelector parserMethod |<br>       (hereType = #keyword or: [ hereType = #word or: [ hereType = #binary ] ])<br>             ifFalse: [  ^ self expected: 'pragma declaration' ].<br>  <br>+         (here last == $:<br>+                 and: [(parserSelector := Symbol lookup: here allButLast) notNil])<br>+                        ifFalse: ["Quick exit to not break one-word pragmas such as <u></u> and <u></u>; also avoid interning new symbols for made-up pragmas such as for <u></u> not interning #my."</div></blockquote></div><div id="m_-6294377689839082684__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000"><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px"><div style="font-family:Arial,Helvetica,sans-serif"><br>+                               ^ self pragmaStatementKeywords].<br>-     (self class includesSelector: (parserSelector := here asSimpleGetter)) ifTrue: [<br>-             ((parserMethod := self class compiledMethodAt: parserSelector) pragmas<br>-                       anySatisfy: [:pragma | pragma keyword == #pragmaParser])<br>-                             ifTrue: [^ self executeMethod: parserMethod]].<br>  <br>+       self class methodDict<br>+            at: parserSelector<br>+               ifPresent: [:parserMethod |<br>+                      (parserMethod pragmas<br>+                            anySatisfy: [:pragma | pragma keyword == #pragmaParser])<br>+                                         ifTrue: [^ self executeMethod: parserMethod]].<br>+ <br>        ^ self pragmaStatementKeywords!<br><br><br><u></u><u></u><u></u><u></u><u></u><u></u></div></blockquote></div><br>
</blockquote></div></div>
</div></blockquote>
                                        </div></body>