[#4766] Wiki — "Glen Stampoultzis" <trinexus@...>

21 messages 2000/09/04
[#4768] RE: Wiki — "NAKAMURA, Hiroshi" <nahi@...> 2000/09/04

Hi, Glen,

[#4783] Re: Wiki — Masatoshi SEKI <m_seki@...> 2000/09/04

[#4785] Re: Wiki — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/09/05

Howdy,

[#4883] Re-binding a block — Dave Thomas <Dave@...>

16 messages 2000/09/12

[#4930] Perl 6 rumblings -- RFC 225 (v1) Data: Superpositions — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/09/15

[#4936] Ruby Book Eng. translation editor's questions — Jon Babcock <jon@...>

20 messages 2000/09/16

[#5045] Proposal: Add constants to Math — Robert Feldt <feldt@...>

15 messages 2000/09/21

[#5077] Crazy idea? infix method calls — hal9000@...

This is a generalization of the "in" operator idea which I

17 messages 2000/09/22

[#5157] Compile Problem with 1.6.1 — Scott Billings <aerogems@...>

When I try to compile Ruby 1.6.1, I get the following error:

15 messages 2000/09/27

[ruby-talk:5179] Re: methods w/ ! giving nil

From: matz@... (Yukihiro Matsumoto)
Date: 2000-09-28 23:46:17 UTC
List: ruby-talk #5179
Hi,

In message "[ruby-talk:5173] Re: methods w/ ! giving nil"
    on 00/09/28, Davide Marchignoli <marchign@di.unipi.it> writes:
|
|> Actually Ruby does have its own qsort routine in C (in util.c), which
|> is compatible with original qsort(3).  Only problem left is re-design
|> and hack the routine.   I'm afraid it's a tough task, for me at least.
|
|Changing swap does not work since swap can be invoked also for equal
|values and it one has to be careful in defining if the list is changed or
|not. The only other solution (I can think of) is checking if the array is
|already sorted. The check is already present in the ruby_sort code so this
|small change does not affect performances.
|
|In any case, the *average* cost of checking if an array is sorted is a
|*small* constant number of comparisons.
|
|The following patch should do the job:

Let me compare this with [ruby-talk:4564].  And could give me a patch
in unified diff style next time?

							matz.

In This Thread

Prev Next