primitive 65 failures

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

primitive 65 failures

Schwab,Wilhelm K
Why does primitive 65 (#next) include a test on the position vs. read length and sometimes fall back on indexing the collection?  I have been creating my own stream for serial ports, and it was driving me nuts.  After staring at the obvious (the primitive was failing sooner than I expected), I finally looked at Dolphin and saw the same test and fallback.  Doing the analogous things in my code left it working a lot better than it had been.

What gives?  Are we perhaps suffering from a primitive that fails too easily and is running slow code as a result, or is there a "valid" reason for the primitive to fail?

Bill


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: primitive 65 failures

Eliot Miranda-2


On Tue, Sep 7, 2010 at 2:13 PM, Schwab,Wilhelm K <[hidden email]> wrote:
Why does primitive 65 (#next) include a test on the position vs. read length and sometimes fall back on indexing the collection?  I have been creating my own stream for serial ports, and it was driving me nuts.  After staring at the obvious (the primitive was failing sooner than I expected), I finally looked at Dolphin and saw the same test and fallback.  Doing the analogous things in my code left it working a lot better than it had been.

What gives?  Are we perhaps suffering from a primitive that fails too easily and is running slow code as a result, or is there a "valid" reason for the primitive to fail?

Bill, try removing use of the primitive and see if you can see any slowdown in the system.  If you don't (as I've also) then perhaps the primitive is a bad idea anyway.

Eliot
 

Bill


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project