String>>hash performance

Richard A. O'Keefe ok at cs.otago.ac.nz
Tue Sep 3 02:58:55 UTC 2002


	Try
	  Smalltalk listLoadedModules
	*after* a call to the plugin.
	
In a workspace:
    'foobar' hash <PrintIt>
==> 211347526
    Smalltalk listLoadedModules <PrintIt>
==> #('B2DPlugin 32 May 2001 (i)'
      'FloatArrayPluging 20 May 2001 (i)'
      'Matrix2x3Plugin 30 May 2001 (i)'
      'BitBltPlugin 30 May 2001 (i)'
      'SecurityPlugin 30 May 2001 (i)'
      'LargIntegers v1.2 30 May 2001 (i)'
      'FilePlugin 30 May 2001 (i)'
      'MiscPrimitivePlugin 30 May 2001 (i)'
    )

String class>>stringHash:initialHash: starts with

    <primitive: 'primitiveStringHash' module: 'MiscPrimitivePlugin'>

so the plugin is there.

	> How do I check whether it has this method or not?
	
	In the method calling the prim you could place a
	  self error: 'not called'
	after the prim call. If the prim call works (since the plugin is reachable),
	the error line won't be reached.
	
Adding 'self halt.' after the <primitive: > line and typing Cmd-s
results in an unresponsive Squeak.  Thank goodness File|Quit works.

Adding 'Transcript print: stringSize; endEntry.' after the assignment
to stringSize results in a never-ending series of 9s appearing on the
Transcript.

So the module IS loaded but the primitive is NOT being used.

I note that MiscPrimitivePlugin is dated 2001.05.30, but the
String class>>stringHash:initialHash: method is dated 2001.09.28.

It looks like the Squeak 3.2 I downloaded from the usual site didn't
have an up to date MiscPrimitivePlugin.

Someone else will have to fix this; I don't understand plugins at all.




More information about the Squeak-dev mailing list