James Britt wrote:
> Roger Pack wrote:
> > Wondering if anybody had suggestions for how to speed up 1.8.6 on an old
> > mac os x ppc.  Thoughts?
>
> Before this goes too far, the answer "Use C" would be considered:
>
> A) Helpful
> B) Trolling
> C) Flame-bait
> D) Laughable
> E) None of the above

Use Pascal.

A recent thread showed how slow Ruby is at generating
a string in which each character in the original string is
duplicated.

// Pascal (FreePascal)
uses sysutils { for timing }, strutils { for DupeString };

function dup_chars( var s: ansistring ): ansistring;
var
  out: ansistring;
  i: longint;
  c: char;
begin
  setlength( out, length(s) * 2 );
  for i := 1 to length(s) do
  begin
    c := s[i];
    out[2*i-1] := c;
    out[2*i] := c;
  end;
  exit( out )
end;

var
  s : ansistring;
  when : tDateTime;
begin
  s := dupeString( 'abc', 1000000 );
  when := Time;
  dup_chars( s );
  writeln( ((time - when) * secsPerDay):0:3, ' seconds' )
end.