diff options
author | Björn Gustavsson <[email protected]> | 2012-08-17 12:11:47 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-10-09 15:24:38 +0200 |
commit | b76588fb5a4057dce8c26307e497370a33217a44 (patch) | |
tree | c51b3b493b466c2308626a844606a5ea63b22d80 /lib/compiler/src/beam_block.erl | |
parent | 34afddc135ff25cefa75aee70b8d09186f78085e (diff) | |
download | otp-b76588fb5a4057dce8c26307e497370a33217a44.tar.gz otp-b76588fb5a4057dce8c26307e497370a33217a44.tar.bz2 otp-b76588fb5a4057dce8c26307e497370a33217a44.zip |
v3_codegen: Combine adjacent bs_match_string instructions
In modules with huge functions with many bs_match_string
instructions, we can speed up the compilation by combining
adjacent bs_match_strings instruction in v3_codegen (as opposed
to in beam_block where we used to do it).
For instance, on my computer the v3_codegen became more than
twice as fast when compiling the re_testoutput1_split_test module
in the STDLIB test suites.
Diffstat (limited to 'lib/compiler/src/beam_block.erl')
-rw-r--r-- | lib/compiler/src/beam_block.erl | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl index cd568097fa..109bb1ec0e 100644 --- a/lib/compiler/src/beam_block.erl +++ b/lib/compiler/src/beam_block.erl @@ -615,10 +615,6 @@ bsm_opt_2([{test,bs_skip_bits2,F,[Ctx,{integer,I1},Unit1,_]}|Is], [{test,bs_skip_bits2,F,[Ctx,{integer,I2},Unit2,Flags]}|Acc]) -> bsm_opt_2(Is, [{test,bs_skip_bits2,F, [Ctx,{integer,I1*Unit1+I2*Unit2},1,Flags]}|Acc]); -bsm_opt_2([{test,bs_match_string,F,[Ctx,Bin1]}, - {test,bs_match_string,F,[Ctx,Bin2]}|Is], Acc) -> - I = {test,bs_match_string,F,[Ctx,<<Bin1/bitstring,Bin2/bitstring>>]}, - bsm_opt_2([I|Is], Acc); bsm_opt_2([I|Is], Acc) -> bsm_opt_2(Is, [I|Acc]); bsm_opt_2([], Acc) -> reverse(Acc). |