Login  Register

Re: Slow compilation on one of my Windows PCs

Posted by Jan Blizničenko on Jun 30, 2015; 7:25am
URL: https://forum.world.st/Slow-compilation-on-one-of-my-Windows-PCs-tp4834668p4834771.html

I ran it in Pharo 4 (40616) because method putSource:inFile:withPreamble: no longer exists in Pharo 5 and results are:

Desktop...
all: 13.062 per second
compile: 6,603 per second (why the hell is there comma as separator and not dot?)
store: 13.431 per second
add: 406.400 per second

Notebook...
all: 210.180 per second
compile: 12,007 per second
store: 454.818 per second
add: 806.239 per second

Jan

Peter Uhnák wrote
Windows XP
1011857707 bytecodes/sec; 132044070 sends/sec

Debian
1172295363 bytecodes/sec; 144744207 sends/sec

But I think taking the compile: method apart tells a better story

~~~~~~~~~~~~~~~~~~~
code := 'a'.

method := Object compiler
source: code;
requestor: nil;
failBlock: [ ^nil ];
compile.

all := [
Object compile: code.
].

compile := [
Object compiler
source: code;
requestor: nil;
failBlock: [ ^nil ];
compile.
].

store := [
method putSource: code inFile: 2
withPreamble: [:f | f cr; nextPut: $!; nextChunkPut: 'Behavior method'; cr].
].

add := [
Object addSelector: method selector withMethod: method notifying: nil.
].
~~~~~~~~~~~~~~~~~~~


Windows XP:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
all bench. "'183.763 per second'"
compile bench. "'10,729 per second'"
*store bench. "'286.170 per second'"*
add bench. "'697.883 per second'"
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Debian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
all bench. "'622.551 per second'"
compile bench. "'11,129 per second'"
*store bench. "'41,604 per second'"*
add bench. "'787.885 per second'"
~~~~~~~~~~~~~~~~~~~~~~~~~~~

150x slower disk operations? -_-

I mean for normal programming this doesn't really matter, but when we are
downloading even medium-sized package it takes ages to process...

Peter