forked from erlang/otp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
beam_asm: Simplify string table generation for beams
The code for generating the string table (which is now only used for bit syntax matching) in a BEAM file is quite complicated and potentially expensive when compiling modules with many thousands of clauses doing bit syntax matching. Simplify and optimize the code using bit syntax and binary:match/2 instead of the list operations in the original code.
- Loading branch information
Showing
3 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-module(string_table). | ||
-export([f/1, g/1]). | ||
|
||
f(<<"string">>) -> string; | ||
f(<<"stringtable">>) -> stringtable. | ||
|
||
g(<<"stringtable">>) -> stringtable; | ||
g(<<"table">>) -> table. |