Re: [Pharo-dev] About ~= and ~~

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

Re: [Pharo-dev] About ~= and ~~

Eliot Miranda-2
Hi Peter,

    I'd appreciate it if you used reply to all to keep the conversation thread going.

> On Nov 25, 2016, at 10:31 AM, Peter Uhnak <[hidden email]> wrote:
>
> Out of interest... is the single extra dispatch really that expensive?

Yes, in the common case where the send of #== is followed by a jump, as it is in ifNil:ifNotNil: or == foo ifTrue: etc.  when #== is inclined the following jump is eliminated and the VM jumps on the condition codes for the comparison.  When #== is a real send it answers the true or false objects and the following jump must compare this result against true or false.

Note that Sista will be able to perform the inclining optimisation so we will get the performance back once Sista is deployed.

>
> And speaking of object inequality... I would like to propose "<>" instead of "~=", because I never remember on which side ~ should be..
>
> Peter
>
>> On Wed, Nov 23, 2016 at 05:39:03AM -0800, Aliaksei Syrel wrote:
>> Hi
>>
>> It is been a while...
>> So, do we want to replace ~~ with a primitive? :)
>>
>> Cheers
>> Alex
>>
>>
>>
>> --
>> View this message in context: http://forum.world.st/About-and-tp3898409p4924391.html
>> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>>
>