[Vm-dev] Finally Time to Make Good on "Everything is a message send"?
Henrik Sperre Johansen
henrik.s.johansen at veloxit.no
Mon Sep 18 16:07:05 UTC 2017
Denis Kudriashov wrote
> Hi
>
>
>> We don't want to give up that performance, but we would like to not get
>> caught cheating either. This would be very simple if instead of raising
>> the
>> "must be boolean" error, we could simply retry the send as a regular
>> message send.
>
>
> This is already in Pharo :)
And it's cool and all, but neither trivial*, nor especially fast:
a := MyBooleanObject new.
[a or: [true]] bench '2,829 per second'
[false or: [true]] bench '188,853,858 per second'
Cheers,
Henry
*Ref threads like
http://forum.world.st/Re-Pharo-dev-mustBeBooleanMagicIn-can-crash-the-vm-td4772716.html#a4772724
http://forum.world.st/Re-Pharo-dev-eventual-crashes-pharo-vm-tp4961763.html
--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
More information about the Vm-dev
mailing list