finally creating less objects in the test
basic still #23 , now applied Basic size of 20, interpreter gets 50 and the full set is 1024 Tests run more than twice as fast!!
This commit is contained in:
@ -1,11 +1,36 @@
|
||||
module Parfait
|
||||
def self.default_test_options
|
||||
{}
|
||||
{
|
||||
factory: 20,
|
||||
}
|
||||
end
|
||||
def self.interpreter_test_options
|
||||
{
|
||||
factory: 50,
|
||||
}
|
||||
end
|
||||
def self.full_test_options
|
||||
{
|
||||
factory: 1024,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
module RubyX
|
||||
def self.default_test_options
|
||||
{ parfait: Parfait.default_test_options}
|
||||
{
|
||||
parfait: Parfait.default_test_options
|
||||
}
|
||||
end
|
||||
def self.full_test_options
|
||||
{
|
||||
parfait: Parfait.full_test_options
|
||||
}
|
||||
end
|
||||
def self.interpreter_test_options
|
||||
{
|
||||
parfait: Parfait.interpreter_test_options,
|
||||
platform: :interpreter
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -12,4 +12,10 @@ module Parfait
|
||||
@method = Parfait::CallableMethod.new( :meth , @obj , @args , @frame)
|
||||
end
|
||||
end
|
||||
class BigParfaitTest < ParfaitTest
|
||||
def setup
|
||||
Parfait.boot!(Parfait.full_test_options)
|
||||
@space = Parfait.object_space
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -7,7 +7,7 @@ module Risc
|
||||
include ScopeHelper
|
||||
|
||||
def setup
|
||||
compiler = RubyX::RubyXCompiler.new(RubyX.default_test_options)
|
||||
compiler = RubyX::RubyXCompiler.new(RubyX.interpreter_test_options)
|
||||
@linker = compiler.ruby_to_binary(@string_input, :interpreter)
|
||||
@interpreter = Interpreter.new(@linker)
|
||||
@interpreter.start_program
|
||||
|
Reference in New Issue
Block a user