[ENH][PLUGIN] LargeIntegers plugin/module with bit logic

Raab, Andreas Andreas.Raab at disney.com
Tue Mar 14 07:20:04 UTC 2000


Folks,

For those of you not having a C compiler at hand - attached is a Windows DLL
for the latest LargeIntegers (LargeIntegersPlugin.6.cs) stuff. You'll need
to file in Stephan's CS for the integer bindings in addition which is at 

http://www.evolgo.com/Squeak/LargeIntegers/2.7/Install_LargeIntegers_module.
5.cs.gz

[Note: the above URL will probably appear wrapped]
The plugin works rather smoothly and seems to be seriously faster - the
factorial example runs at about 100-150 times faster (side note: Do *not*
try the 10,000 factorial unless you've got an Athlon or something above that
range, go for 1,000 - 5,000 instead ;-) Just for the fun of it I tried a
little more realistic scenario in a case where LargeInts are heavily used.
Here it is:

| bb |
bb _ BitBlt toForm: Display.
bb sourceForm: Display.
bb destRect: Display boundingBox.
bb sourceOrigin: 1 at 1.
bb combinationRule: Form over.
Time millisecondsToRun:[bb copyBitsSimulated].

Lo and behold - It's a clear factor of five faster with the plugin than
without. Which is quite a bit more than I personally expected (seems like I
underestimated the amount of LargeInt ops in BitBlt) and shows the real life
value of this stuff pretty nicely.

Thanks for this great piece of work!

  Andreas

PS. Something subtle: With the new fast failure scheme for external prims
the BB example is 10-15% faster when run without the plugin being there
compared to failing in the plugin (e.g., when the plugin is disabled). Kinda
cool.

PPS. Note to Stephan: I had to take out the 'self error:' from
LargeIntegersPlugin>>think since it's undefined in the plugin. Using
unresolved symbols in a library is not allowed on Windows (and on Macs as
well AFAIK) so it would be a good idea to get rid of the #think altogether.

> -----Original Message-----
> From: Stephan Rudlof [mailto:sr at evolgo.de]
> Sent: Monday, March 13, 2000 12:30 PM
> To: ML Squeak
> Cc: recipient list not shown
> Subject: [ENH][PLUGIN] LargeIntegers plugin/module with bit logic
> 
> 
> Dear Squeakers,
> 
> at
>         http://www.evolgo.com/Squeak/
> there are new versions of the LargeIntegers plugin, compiled 
> module and
> install changeset.
> 
> New : #bitAnd:, #bitOr:, #bitXor: for positive Integers.
> 
> 
> Greetings,
> 
> Stephan
> -- 
> Stephan Rudlof (sr at evolgo.de)
>    "Genius doesn't work on an assembly line basis.
>     You can't simply say, 'Today I will be brilliant.'"
>     -- Kirk, "The Ultimate Computer", stardate 4731.3
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: LargeIntegers.zip
Type: application/octet-stream
Size: 12655 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000313/e290bb5a/LargeIntegers.obj


More information about the Squeak-dev mailing list