IntegerTest>>testRaisedToModulo too slow

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

IntegerTest>>testRaisedToModulo too slow

Bert Freudenberg
Without a LargeIntegers plugin, this test is way too slow, it times out. Even in Cog it takes almost 1 minute:

"disable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegers])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegersDisabled]].
Smalltalk unloadModule: #LargeIntegers.

"run test"
IntegerTest run: #testRaisedToModulo.

"enable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegersDisabled])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegers]].
Smalltalk unloadModule: #LargeIntegersDisabled.


- Bert -




smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: IntegerTest>>testRaisedToModulo too slow

Nicolas Cellier
It's reasonnably 259ms here with a homebrew cog (accelerated 32bits large int), core i7, win7...
27770ms with disabled plugin (default time out is set to 5000ms I think)
Should we test if #LargeIntegers module is loaded in preamble?


2014-07-24 16:03 GMT+02:00 Bert Freudenberg <[hidden email]>:
Without a LargeIntegers plugin, this test is way too slow, it times out. Even in Cog it takes almost 1 minute:

"disable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegers])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegersDisabled]].
Smalltalk unloadModule: #LargeIntegers.

"run test"
IntegerTest run: #testRaisedToModulo.

"enable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegersDisabled])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegers]].
Smalltalk unloadModule: #LargeIntegersDisabled.


- Bert -







Reply | Threaded
Open this post in threaded view
|

Re: IntegerTest>>testRaisedToModulo too slow

Bert Freudenberg
On 24.07.2014, at 19:32, Nicolas Cellier <[hidden email]> wrote:

It's reasonnably 259ms here with a homebrew cog (accelerated 32bits large int), core i7, win7...
27770ms with disabled plugin (default time out is set to 5000ms I think)
Should we test if #LargeIntegers module is loaded in preamble?

Is it really necessary to run 2500 iterations? Wouldn't 5 or so be enough?

- Bert -

2014-07-24 16:03 GMT+02:00 Bert Freudenberg <[hidden email]>:
Without a LargeIntegers plugin, this test is way too slow, it times out. Even in Cog it takes almost 1 minute:

"disable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegers])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegersDisabled]].
Smalltalk unloadModule: #LargeIntegers.

"run test"
IntegerTest run: #testRaisedToModulo.

"enable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegersDisabled])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegers]].
Smalltalk unloadModule: #LargeIntegersDisabled.


- Bert -











smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: IntegerTest>>testRaisedToModulo too slow

Nicolas Cellier
Bert, I don't remember if it was really necessary (it was probably useful during development, now it's questionnable).
See if last inbox commit fits...


2014-07-24 20:04 GMT+02:00 Bert Freudenberg <[hidden email]>:
On 24.07.2014, at 19:32, Nicolas Cellier <[hidden email]> wrote:

It's reasonnably 259ms here with a homebrew cog (accelerated 32bits large int), core i7, win7...
27770ms with disabled plugin (default time out is set to 5000ms I think)
Should we test if #LargeIntegers module is loaded in preamble?

Is it really necessary to run 2500 iterations? Wouldn't 5 or so be enough?

- Bert -

2014-07-24 16:03 GMT+02:00 Bert Freudenberg <[hidden email]>:
Without a LargeIntegers plugin, this test is way too slow, it times out. Even in Cog it takes almost 1 minute:

"disable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegers])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegersDisabled]].
Smalltalk unloadModule: #LargeIntegers.

"run test"
IntegerTest run: #testRaisedToModulo.

"enable LargeIntegers plugin"
CompiledMethod allInstancesDo: [:cm |
        (cm primitive = 117 and: [(cm literalAt: 1) first = #LargeIntegersDisabled])
                ifTrue: [(cm literalAt: 1) at: 1 put: #LargeIntegers]].
Smalltalk unloadModule: #LargeIntegersDisabled.


- Bert -