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:
@@ -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) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user