2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 01:32:12 +00:00

Order of magnitude speed and memory improvement on sequence.unique. (merge from HEAD)

[SVN r35191]
This commit is contained in:
Rene Rivera
2006-09-19 03:54:16 +00:00
parent dde499bd33
commit f29be3fd34

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) ;
}