@@ -4828,7 +4828,7 @@ def test_no_filesystem(self):
4828
4828
assert no_size < 360000
4829
4829
4830
4830
def test_no_nuthin (self ):
4831
- print ( 'part one: check NO_FILESYSTEM is automatically set, and effective' )
4831
+ # check NO_FILESYSTEM is automatically set, and effective
4832
4832
def test (opts , ratio , absolute ):
4833
4833
print ('opts, ratio, absolute:' , opts , ratio , absolute )
4834
4834
def get_size (name ):
@@ -4851,13 +4851,14 @@ def do(name, source, moar_opts):
4851
4851
if '--closure' in opts : # no EXPORTED_RUNTIME_METHODS makes closure much more effective
4852
4852
assert sizes ['no_nuthin' ] < 0.975 * sizes ['no_fs' ]
4853
4853
assert sizes ['no_fs_manual' ] < sizes ['no_fs' ] # manual can remove a tiny bit more
4854
- test ([], 0.75 , 360000 )
4854
+ test (['-s' , 'ASSERTIONS=0' ], 0.75 , 360000 ) # we don't care about code size with assertions
4855
4855
test (['-O1' ], 0.66 , 210000 )
4856
4856
test (['-O2' ], 0.50 , 70000 )
4857
4857
test (['-O3' , '--closure' , '1' ], 0.60 , 50000 )
4858
4858
test (['-O3' , '--closure' , '2' ], 0.60 , 41000 ) # might change now and then
4859
4859
4860
- print ('part two: focus on EXPORTED_RUNTIME_METHODS effects, on hello_world_em_asm' )
4860
+ def test_no_nuthin_2 (self ):
4861
+ # focus on EXPORTED_RUNTIME_METHODS effects, on hello_world_em_asm
4861
4862
def test (opts , ratio , absolute ):
4862
4863
print ('opts, ratio, absolute:' , opts , ratio , absolute )
4863
4864
def get_size (name ):
@@ -4876,7 +4877,7 @@ def do(name, moar_opts):
4876
4877
assert sizes ['no_nuthin' ] < absolute
4877
4878
if '--closure' in opts : # no EXPORTED_RUNTIME_METHODS makes closure much more effective
4878
4879
assert sizes ['no_nuthin' ] < 0.975 * sizes ['normal' ]
4879
- test ([], 1 , 220000 )
4880
+ test (['-s' , 'ASSERTIONS=0' ], 1 , 220000 ) # we don't care about code size with assertions
4880
4881
test (['-O1' ], 1 , 215000 )
4881
4882
test (['-O2' ], 0.99 , 75000 )
4882
4883
test (['-O3' , '--closure' , '1' ], 0.975 , 50000 )
0 commit comments