2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Order of magnitude speed and memory improvement on sequence.unique.

[SVN r35190]
This commit is contained in:
Rene Rivera
2006-09-19 03:53:15 +00:00
parent 0df12c504b
commit 624e973954

View File

@@ -179,12 +179,14 @@ rule length ( s * )
rule unique ( list * )
{
local result ;
for local f in $(list)
local prev ;
for local i in [ SORT $(list) ]
{
if ! $(f) in $(result)
if $(i) != $(prev)
{
result += $(f) ;
result += $(i) ;
}
prev = $(i) ;
}
return $(result) ;
}