diff options
author | Lukas Larsson <[email protected]> | 2015-12-08 17:41:12 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-03-29 10:56:21 +0200 |
commit | da9b3a0825a3243aecfd849e11d1e37e5ccc96af (patch) | |
tree | 52c2bf0be7181b1a084e948d2dc5b1c2715f5587 /erts/emulator/sys/win32 | |
parent | cee5b753e8dbd294b2677f684c404d16dcfcd643 (diff) | |
download | otp-da9b3a0825a3243aecfd849e11d1e37e5ccc96af.tar.gz otp-da9b3a0825a3243aecfd849e11d1e37e5ccc96af.tar.bz2 otp-da9b3a0825a3243aecfd849e11d1e37e5ccc96af.zip |
erts: inline tag_val_def
The tag_val_def function was called and multiple switch statements
had to be traversed in term.c, and then a big switch in the calling
code to branch on the term types. By inlining the switches are
merged by the compiler and a lot fewer branches have to be taken.
Benchmarks show that this increases performance of enc_term by as
much as 10%.
Diffstat (limited to 'erts/emulator/sys/win32')
-rw-r--r-- | erts/emulator/sys/win32/sys.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index ea7523ddc2..391bbd4cbc 100644 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -3079,6 +3079,8 @@ erl_bin_write(buf, sz, max) } } +#endif /* DEBUG */ + void erl_assert_error(const char* expr, const char* func, const char* file, int line) { @@ -3094,7 +3096,6 @@ erl_assert_error(const char* expr, const char* func, const char* file, int line) DebugBreak(); } -#endif /* DEBUG */ static void check_supported_os_version(void) |