diff options
author | Anders Svensson <[email protected]> | 2017-04-16 09:51:34 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-06-12 16:13:52 +0200 |
commit | f2e75976772b6a1d52a2c71ec1eecb4b338ed632 (patch) | |
tree | cb2fc7594cd6f2d12d3b673a2c3db476212f0fd8 /lib/diameter/test/diameter_codec_test.erl | |
parent | 0911c97768caeb908c3f18fd1ba514c1c7f273d5 (diff) | |
download | otp-f2e75976772b6a1d52a2c71ec1eecb4b338ed632.tar.gz otp-f2e75976772b6a1d52a2c71ec1eecb4b338ed632.tar.bz2 otp-f2e75976772b6a1d52a2c71ec1eecb4b338ed632.zip |
Replace slow binary comprehensions
Which appears to be about an order of magnitude slower than just
creating a binary of the desired size.
Diffstat (limited to 'lib/diameter/test/diameter_codec_test.erl')
-rw-r--r-- | lib/diameter/test/diameter_codec_test.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_codec_test.erl b/lib/diameter/test/diameter_codec_test.erl index 869797f11f..d8b7377c0c 100644 --- a/lib/diameter/test/diameter_codec_test.erl +++ b/lib/diameter/test/diameter_codec_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2016. All Rights Reserved. +%% Copyright Ericsson AB 2010-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -280,7 +280,8 @@ d(F, Eq, V) -> end. z(B) -> - << <<0>> || <<_>> <= B >>. + Sz = size(B), + <<0:Sz/unit:8>>. %% values/1 %% |