Commit Graph

3 Commits

Author SHA1 Message Date
Julien Fischer
ea96c873d3 Add a new function to the array module for creating a new array from
Branches: main

Add a new function to the array module for creating a new array from
a list in reverse order.

Make the existing array.from_list/2 predicate more efficient.

library/array.m:
	Add the function array.from_reverse_list/1.

	Since array.from_list immediately fills in the elements
	of a newly-created array with those of the lists, don't
	bother initialising the array elements when the array
	is allocated (except in debugging grades).

	Generalise ML_unsafe_new_aray so that it can be used
	for both the above.

tests/general/array_test.m:
tests/general/array_test.exp:
	Test the new function.

	Update syntax and formatting in this test case.

NEWS:
	Announce the new function.
2011-05-29 17:21:15 +00:00
Ralph Becket
6ce0cfb902 Removed mergesort in favour of samsort which has much better
Estimated hours taken: 3

library/array.m:
	Removed mergesort in favour of samsort which has much better
	performance on mostly sorted data and is within a hair as
	good on random data.
2001-02-20 10:42:17 +00:00
Andrew Bromage
85915ad88a The main purpose of this change is to rename array.m as bt_array.m, and
Estimated hours taken: 6

The main purpose of this change is to rename array.m as bt_array.m, and
uniq_array.m as array.m.  The interfaces of those two modules have grown
slightly so that they match a little more closely.  Details are in the
file NEWS.

The implementation of bt_array (formerly array) has been changed to use
a slightly more efficient implementation.

NEWS:
        Interface changes documented.

library/array.m:
library/bt_array.m:
        Changes mentioned above and detailed in the NEWS file.

library/uniq_array.m:
        Bereft of life and resting in peace.

library/io.m:
library/library.m:
library/std_util.m:
library/term.m:
compiler/base_type_layout.m:
runtime/deep_copy.c:
runtime/type_info.h:
        Minor changes to fix the special case of base_type_layout
        operations for arrays rather than uniq_arrays.

tests/hard_coded/write.exp:
tests/hard_coded/write.m:
        Test writing of arrays.

tests/general/array_test.exp:
tests/general/array_test.m:
        Test some array/bt_array operations.
1997-07-25 05:16:31 +00:00