From a1c796e7f6b86b4b506492ae6354382c565278d1 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 12 Oct 2017 16:00:50 +0200 Subject: erts: Implement batching maps:iterator This iterator implementation fetches multiple elements to iterate over in one call to erts_internal:maps_next instead of one at a time. This means that the memory usage will go up for the iterator as we are buffering elements, but the usage is still bounded. In this implementation the max memory usage is 1000 words. Using this approach makes the iterator as fast as using maps:to_list, so maps:iterator/2 has been removed. --- bootstrap/lib/stdlib/ebin/maps.beam | Bin 2864 -> 3364 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap/lib/stdlib/ebin/maps.beam b/bootstrap/lib/stdlib/ebin/maps.beam index f07f4f922d..6820b81db5 100644 Binary files a/bootstrap/lib/stdlib/ebin/maps.beam and b/bootstrap/lib/stdlib/ebin/maps.beam differ -- cgit v1.2.3 From f1666d981aab4e4cf94b91dc097675fa0b056c97 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 12 Oct 2017 15:55:04 +0200 Subject: stdlib: Make io_lib and io_lib_pretty use maps iterator --- bootstrap/lib/stdlib/ebin/io_lib.beam | Bin 11948 -> 13240 bytes bootstrap/lib/stdlib/ebin/io_lib_pretty.beam | Bin 17140 -> 17288 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap/lib/stdlib/ebin/io_lib.beam b/bootstrap/lib/stdlib/ebin/io_lib.beam index 82642fb353..c0a8f7212e 100644 Binary files a/bootstrap/lib/stdlib/ebin/io_lib.beam and b/bootstrap/lib/stdlib/ebin/io_lib.beam differ diff --git a/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam b/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam index 6ed1e3b7cc..76e56eb399 100644 Binary files a/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam and b/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam differ -- cgit v1.2.3 From 2994bda075a5119cd3b1d499b5897a3d1befdc6b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 13 Oct 2017 15:50:04 +0200 Subject: Update primary bootstrap --- bootstrap/lib/compiler/ebin/compiler.appup | 2 +- bootstrap/lib/stdlib/ebin/io_lib.beam | Bin 13240 -> 12088 bytes bootstrap/lib/stdlib/ebin/maps.beam | Bin 3364 -> 3464 bytes 3 files changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap/lib/compiler/ebin/compiler.appup b/bootstrap/lib/compiler/ebin/compiler.appup index 277b35faa8..2973178217 100644 --- a/bootstrap/lib/compiler/ebin/compiler.appup +++ b/bootstrap/lib/compiler/ebin/compiler.appup @@ -16,7 +16,7 @@ %% limitations under the License. %% %% %CopyrightEnd% -{"7.1.1", +{"7.1.3", [{<<".*">>,[{restart_application, compiler}]}], [{<<".*">>,[{restart_application, compiler}]}] }. diff --git a/bootstrap/lib/stdlib/ebin/io_lib.beam b/bootstrap/lib/stdlib/ebin/io_lib.beam index c0a8f7212e..b6d6d49d26 100644 Binary files a/bootstrap/lib/stdlib/ebin/io_lib.beam and b/bootstrap/lib/stdlib/ebin/io_lib.beam differ diff --git a/bootstrap/lib/stdlib/ebin/maps.beam b/bootstrap/lib/stdlib/ebin/maps.beam index 6820b81db5..50678db509 100644 Binary files a/bootstrap/lib/stdlib/ebin/maps.beam and b/bootstrap/lib/stdlib/ebin/maps.beam differ -- cgit v1.2.3