#1356: [TODO] add method FixedStringArray.sort()
---------------------+------------------------------------------------------
Reporter: fperrad | Owner: whiteknight
Type: RFC | Status: assigned
Priority: normal | Milestone:
Component: core | Version: master
Severity: medium | Keywords:
Lang: | Patch:
Platform: all |
---------------------+------------------------------------------------------
Changes (by whiteknight):
* version: 1.8.0 => master
* type: todo => RFC
Comment:
I have a preliminary finding that is quite interesting. I implemented a
Quicksort routine in winxed for sorting ResizablePMCArrays. My quicksort
is about 20% faster than the built-in sort method when a custom comparison
routine is used. When the built-in C-level comparisons are used, the
current method is 80% faster than the winxed version. I suspect the
difference here is that the current method has optimizations for NCI PMCs
to invoke them without PCC. When a custom comparison sort is used, as I
suspect it would be for most HLL applications, the current version is
significantly slower than a version written in pure PIR.
My recommendation, and I am looking for feedback, is this: I would like to
deprecate and remove the sort method from the various array types where it
is present. In exchange, I would like to provide a pure-PIR version in the
standard library. This sort library would not be a built-in method
(although it could always be injected as such at runtime), but would be
able to be used by all array and array-like types, including types which
do not inherit from Parrot's current array types.
If this sounds like an attractive trade-off, I will get the process
started. If not, we can search for alternatives.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1356#comment:4>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets