"brian wheeler" wrote:

> I've written a quicksort which will sort a file on stdin.  It could go
> into examples, I suppose.

> Building parrot with -pg makes it run 5s slower.  The gprof -T dump of
> the timings looks like this:

I find it useful, if running on a system that normally uses the computed
goto core, to supply the -g switch to parrot, to tell it to switch to the
standard core instead. That way, you don't get a big block of time just
allocated to cg_core.

I was starting with a very simple test to decide how to determine where the
memory overuse was coming from, but I noticed some unusual results:

$ cat test.in
aa
ee
dd
cc
bb

$ ./parrot qs.pbc < test.in
Starting quicksort with 0 and 5
Starting quicksort with 0 and 1
Starting quicksort with 0 and 0
Starting quicksort with 2 and 1
Starting quicksort with 3 and 5
Starting quicksort with 3 and 4
Starting quicksort with 3 and 3
Starting quicksort with 5 and 4
Starting quicksort with 6 and 5

dd
aa
bb
ee
cc

Am I missing something somewhere?

--
Peter Gibbs
EmKel Systems


Reply via email to