Performance of #hasLiteral:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Performance of #hasLiteral:

marcel.taeumel
Hi, all! :-)

I am thinking about literals to which a method refers only implicitely via a special bytecode. There are scan blocks for that such asin EncoderForSistaV1 class >> #scanBlockorNilForLiteral:.

However, it doesn't make sense to do that for regular literals such as #someRegularLiteralMessageSelector.

Take a look at CompiledCoded >> #hasLiteral:. It is fast enough for a match but kind of slow otherwise.

Is there a way to add some check to a given literal like "aLiteral isSymbol & aLiteral size > x"? I think we miss some complements for #scanBlockorNilForLiteral:...


Best,
Marcel