Fail on my behalf.. thanks. 
SCAR Code:
program New;
procedure DropAllExceptNew(DontDrop: TIntegerArray);
var
inv, i, h: Integer;
begin
//inv := 1 shl 28;
//Writeln(IntToStr(inv));
h := high(DontDrop);
for i := 0 to h do
{ Set the bit associated with the DontDrop Array }
inv := inv or (1 shl DontDrop[i]);
for i := 1 to 28 do
{ Check the bit at i, and if its high, then we dont drop. }
if (((inv shr i) and 1) = 0) then
begin end;// Writeln('not Dropping number ' + IntToStr(i));
end;
{*******************************************************************************
procedure DropAllExcept(IgnoreInvSlots: TIntegerArray);
By: R1ch
Description: Drops everything in inventory. Ignores slots specified by
IgnoreInvSlots array.
*******************************************************************************}
procedure DropAllExceptOld(IgnoreInvSlots: TIntegerArray);
var
I: Byte;
begin
for I := 1 to 28 do
if (not InIntArray(IgnoreInvSlots, I)) then
begin end;// Writeln('Dropping number ' + IntToStr(i));
end;
var
i, t: Integer;
begin
t := GetSystemTime;
for i := 0 to 9999 do
DropAllExceptNew([25, 22, 7, 8, 9, 23]);
t := GetSystemTime - t;
Writeln('New took: ' + FloatToStr(t / 10000) + 'ms per, total: ' + intToStr(t) + 'ms');
t := GetSystemTime;
for i := 0 to 9999 do
DropAllExceptOld([25, 22, 7, 8, 9, 23]);
t := GetSystemTime - t;
Writeln('Old took: ' + FloatToStr(t / 10000) + 'ms per, total: ' + intToStr(t) + 'ms');
end.
Code:
Successfully compiled (41 ms)
New took: 0.1327ms per, total: 1327ms
Old took: 0.1727ms per, total: 1727ms
Successfully executed
Would be more significant with more in the array.