Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
2134-Measure-also-process-dictionary-variant.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2134-Measure-also-process-dictionary-variant.patch of Package erlang
From 135e6dd9acc9d81988e095ae90eb62ae23828491 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen <raimo@erlang.org> Date: Thu, 17 Mar 2022 11:32:28 +0100 Subject: [PATCH 4/4] Measure also process dictionary variant --- lib/stdlib/test/rand_SUITE.erl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/stdlib/test/rand_SUITE.erl b/lib/stdlib/test/rand_SUITE.erl index b41941d56b..ff0ad72d99 100644 --- a/lib/stdlib/test/rand_SUITE.erl +++ b/lib/stdlib/test/rand_SUITE.erl @@ -1100,6 +1100,20 @@ do_measure(_Config) -> State) end, benchmark_dummy, TMarkUniformFullRange), + _ = + measure_1( + fun (State) -> half_range(State) bsl 1 end, + fun (State, Range, Mod) -> + measure_loop( + fun (St) -> + case Mod:uniform(Range) of + X when is_integer(X), 1 =< X, X =< Range -> + St + end + end, + State) + end, + procdict, TMarkUniformFullRange), %% ct:pal("~nRNG uniform integer full range + 1 performance~n",[]), _ = @@ -1287,6 +1301,8 @@ measure_1(RangeFun, Fun, Alg, TMark) -> {?MODULE, <<>>}; benchmark_dummy -> {?MODULE, ignored_state}; + procdict -> + {rand, rand:seed(default)}; _ -> {rand, rand:seed_s(Alg)} end, -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor