aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/lists_SUITE.erl
AgeCommit message (Collapse)Author
2019-07-01Merge branch 'john/erts/lists_subtract_fixes/OTP-15938/OTP-15939' into maintJohn Högberg
* john/erts/lists_subtract_fixes/OTP-15938/OTP-15939: erts: Fix integer overflow in loader erts: Fix integer overflow in list subtraction
2019-07-01erts: Fix integer overflow in list subtractionJohn Högberg
CMP_TERM returned an `Sint`, which overflowed the `int` used in erl_rbtree for storing the comparison, causing list subtraction to behave strangely.
2018-11-16Merge branch 'john/erts/plusplus-trapping/OTP-15427'John Högberg
* john/erts/plusplus-trapping/OTP-15427: Don't use too many reductions in lists:reverse/2 Make '++'/2 trapping
2018-11-14Merge branch 'maint'Lukas Larsson
* maint: Updated OTP version Prepare release Optimize operator '--' and yield on large inputs
2018-11-14Merge branch 'maint-18' into maintLukas Larsson
* maint-18: Updated OTP version Prepare release Optimize operator '--' and yield on large inputs Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_lists.c erts/vsn.mk lib/stdlib/doc/src/notes.xml lib/stdlib/vsn.mk make/otp_version_tickets otp_versions.table
2018-11-09Make '++'/2 trappingJohn Högberg
2018-11-05Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-11-02Merge branch 'maint'John Högberg
* maint: Optimize operator '--' and yield on large inputs Inline erts_cmp Clarify a magical allocation size Fix trapping in lists:reverse/2
2018-10-29Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-07-17Optimise creation of anonymous functionsMichał Muskała
This introduces a similar optimisation for normal funs to what was introduced for external funs in #1725. It is possible to allocate the fun as a literal, if it does not capture the environment (i.e. it does not close over any variables). Unfortunately it's not possible to do this in the compiler due to problems with representation of such functions in the `.beam` files. Fortunately, we can do this in the loader. Simple evaluation shows that functions that don't capture the enviornment consistute over 60% of all funs in the source code of Erlang/OTP itself. The only downside is that we lose a meningful value in the `pid` field of the fun. The goal of this field, beyond debugging, was to be able to identify the original node of a function. To be able to still do this, the functions that are created in the loader are assigned the init pid as the creator. To solve issues with staryp, initially set the `erts_init_process_id` to `ERTS_INVALID_PID` and skip the described optimisation if the value is still uninitialised.
2018-03-09stdlib: Add function lists:search/2Hans Bolinder
This is essentially PR 102, https://github.com/erlang/otp/pull/102. The OTP Technical Board decided to change the name of the function to search/2.
2017-05-04Update copyright yearRaimo Niskanen
2017-02-10lists_SUITE: Run the droplast/1 test caseBjörn Gustavsson
The testcase was never actually run.
2016-04-29Merge branch 'jlouis/stdlib/implement-lists-join/PR-1012/OTP-13523'Björn Gustavsson
* jlouis/stdlib/implement-lists-join/PR-1012/OTP-13523: Implement lists:join/2
2016-04-09Implement lists:join/2Jesper Louis Andersen
Add a call which works much like string:join/2 but for arbitrary lists. Provide the function itself, lifted from Haskells Data.List standard library, provide documentation and provide tests for the function.
2016-03-15update copyright-yearHenrik Nord
2016-03-09Remove ?line macrosBjörn Gustavsson
While we are it, also re-ident the files.
2016-03-09Replace "%" with "%%" at the beginning of a lineBjörn Gustavsson
We want to re-ident the source files after having taken out all ?line macros. When re-indenting using Emacs, it's important that comments that should be at the beginning of a line (or follow the indentation of statements around it) must start with "%%".
2016-03-09Eliminate 'suite' and 'doc' clausesBjörn Gustavsson
2016-03-09Modernize use of timetrapsBjörn Gustavsson
Either rely on the default 30 minutes timetrap, or set the timeout using the supported methods in common_test.
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-12-11stdlib tests: Replace 'random' with 'rand'Björn Gustavsson
2015-09-11base64_SUITE: Speed up roundtrip/1Björn Gustavsson
Refactor roundtrip/1 into 4 test cases that can be run in parallel. Assuming that there are 4 cores available, the group of 4 test cases will run at roughly one fourth of the time for the original test case.
2015-09-11lists_SUITE: Test lists:concat/2Björn Gustavsson
2015-09-11lists_SUITE: Test lists:split/2Björn Gustavsson
2015-09-11lists_SUITE: Add a test case for lists:prefix/2Björn Gustavsson
2015-09-11lists_SUITE: Add hof/1 to test all high-order functionsBjörn Gustavsson
2015-09-11lists_SUITE: Add test for lists:takewhile/1Björn Gustavsson
2015-09-11lists_SUITE: Run test cases in each group in parallelBjörn Gustavsson
On my computer, this will shave off more than one second of the runnning time and about 4 seconds when cover is being run.
2015-09-11lists_SUITE: Test lists:keyreplace/4Björn Gustavsson
2015-09-11lists_SUITE: Extend flatten/1 test to also test flatlength/1Björn Gustavsson
2015-09-11lists_SUITE: Correct test of lists:flatten/2Björn Gustavsson
The test that was supposed to call lists:flatten/2 called lists:flatten/1!
2015-06-18Change license text to APLv2Bruce Yinhe
2015-04-10Eliminate use of deprecated now/0 for random number generationBjörn Gustavsson
Use erlang:timestamp/0 instead now/0 when seeding the random number generator.
2014-01-24Added tests for lists:droplast/1 to stdlib/lists_SUITEHans Svensson
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-04-30Rename and document lists:zf/2 as lists:filtermap/2Anthony Ramine
This function is used all over the place in OTP itself and people sometimes want that functionality, they may as well not reimplement it themselves.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Fix formatting for stdlibLukas Larsson
2011-02-17Add init_per_suite and end_per_suiteLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update stdlib tests to conform with common_test standardLukas Larsson
2011-02-17Update all fin_per_testcase to end_per_testcase.Lukas Larsson
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP