Re: What is the most fast sorting algorithm?



Rob Thorpe wrote:
In any situation where you care about calling some function for
comparison you would inline the compare function straight into the sort
code. Maybe by keeping it as an external function but instructing the
language to inline it.

This can be done in many languages, but unfortunately not easily in C.

A bit off topic, but this is one of the things that, to me, has great
potential with languages like Java and C# where the machine code is
generated at runtime: in theory, the virtual machine could notice
that some function is being called inside a tight loop and then
dynamically inline it. The cost to do this wouldn't be zero, but
the benefits would be good: you'd get most of the performance of
manually inlining it but none of the code ugliness.

I don't know if any current JVMs or other virtual machines do anything
like this kind of aggressive optimization, but maybe in a few years...

- Logan
.



Relevant Pages

  • Re: Embedding assembler in a language
    ... due to setting copro mask inline and using FPU ... unportable as assembler. ... languages, VM based languages, VB etc, and ... That way SSE instructions or other ...
    (comp.lang.misc)
  • Re: functional languages with inline Intel ASM?
    ... > ASM capabilities? ... Delphiand Kylixhave their own inline assemblers, ... MOV EAX, True ... These languages were designed for the x86 platform, ...
    (comp.lang.asm.x86)
  • Re: Rene cant handle AoAs Success
    ... Languages offering inline Asm are NOT AT ALL languages for ... learn inline Assembly. ...
    (alt.lang.asm)
  • Re: Lets organize our Delphi code
    ... inline variable declarations in various spots. ... Java and C#, I don't like the inline declaration of variables in ... these languages. ... I love to have my method declarations in the interface ...
    (borland.public.delphi.non-technical)