Wow this is a bizarre esolang.
It’s not an esolang. It has a long history of actual real production use.
Beating C with Dyalog APL
31–40 of 57 posts
Re: Beating C with Dyalog APL
#32Earlier quoted context omitted.
> that doesn't stop it being an esolang Actually it does: "An esoteric programming language (sometimes shortened to esolang) is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, as software art, as a hacking interface to another language (particularly functional programming or procedural programming languages), or as a joke"
Right, and APL could not be further from the definition given that it started as a chalkboard notation for reasoning about array operations!
How something started and what it became are orthogonal...
I'm pretty sure Jack the Ripper started as a cute baby too...
Re: Beating C with Dyalog APL
#33Earlier quoted context omitted.
Right, and APL could not be further from the definition given that it started as a chalkboard notation for reasoning about array operations!
Right, and Lisp started as a notation in a paper with no intention of building a language. But nobody would call it an esolanguage. How something started and what it became are orthogonal... I'm pretty sure Jack the Ripper started as a cute baby too...
what?
Re: Beating C with Dyalog APL
#34C is a low bar. It has always been slower than Fortran. It has been slower than C++ ever since reasonable optimization was implemented. Anything not faster than C, today, is a slow language, practically by definition.
> It has been slower than C++ ever since reasonable optimization was implemented. Which compilers? Which platforms? Optimized for speed or space (because "faster" is only one dimension of optimization)? Many C / C++ compiler implementations share the same front ends, back ends and runtime libraries, so it's hard to see how the code generation for C would be much different than that of C++. (In fact, C++ will be harde…
If it is hard to see how C++ optimization would differ from C optimization, you simply aren't looking very hard.
There are many different toolchains, but with the toolchains that are commonly used, C++ programs are faster than C programs. More specifically: C++ programs are at least as fast as C programs, because a C program is a badly-coded C++ program that fails to use language constructs that would make it a better program.
Re: Beating C with Dyalog APL
#35Earlier quoted context omitted.
Right, and Lisp started as a notation in a paper with no intention of building a language. But nobody would call it an esolanguage. How something started and what it became are orthogonal... I'm pretty sure Jack the Ripper started as a cute baby too...
> Lisp started as a notation in a paper with no intention of building a language what?
Re: Beating C with Dyalog APL
#36Earlier quoted context omitted.
Right, and Lisp started as a notation in a paper with no intention of building a language. But nobody would call it an esolanguage. How something started and what it became are orthogonal... I'm pretty sure Jack the Ripper started as a cute baby too...
> Lisp started as a notation in a paper with no intention of building a language what?
Re: Beating C with Dyalog APL
#37Earlier quoted context omitted.
> Lisp started as a notation in a paper with no intention of building a language what?
Yes. Originally it was a thought experiment. Just like mathematicians can imagine an idea and use a notation without creating a compiler.
McCarthy early on proposed to write a compiler - actually this was one of the very very early papers:
J. McCarthy. Memo to P. M. Morse: A Proposal for a compiler. Memo CC-56, Computation Center, Massachusetts Institute of Technology, December 13, 1957, 19 pages.
http://www.softwarepreservation.org/projects/LISP/MIT/CC-56....
Re: Beating C with Dyalog APL
#38Earlier quoted context omitted.
> It has been slower than C++ ever since reasonable optimization was implemented. Which compilers? Which platforms? Optimized for speed or space (because "faster" is only one dimension of optimization)? Many C / C++ compiler implementations share the same front ends, back ends and runtime libraries, so it's hard to see how the code generation for C would be much different than that of C++. (In fact, C++ will be harde…
The one area where C++ can be a lot faster than C is in places where C uses a function pointer where C++ uses a function template. The standard example is sorting. Say you’re sorting an array of integers. Then, C’s sort has to (1) call the comparison function passed as an argument, whereas C++’s std::sort can inline the comparisons into a single instruction. (1) if the source of the function passed in is visible from…
Another is where a better algorithm is available in a library than would be convenient to implement in custom form in C. C++ libraries get a lot more attention to optimization than C libraries because it pays back much more. For example, there are really excellent hash table libraries in C++ that would be unimplementable, as a reusable library, in C. C hash tables are typically hand-rolled in place.
Re: Beating C with Dyalog APL
#39Earlier quoted context omitted.
> It has been slower than C++ ever since reasonable optimization was implemented. Which compilers? Which platforms? Optimized for speed or space (because "faster" is only one dimension of optimization)? Many C / C++ compiler implementations share the same front ends, back ends and runtime libraries, so it's hard to see how the code generation for C would be much different than that of C++. (In fact, C++ will be harde…
The one area where C++ can be a lot faster than C is in places where C uses a function pointer where C++ uses a function template. The standard example is sorting. Say you’re sorting an array of integers. Then, C’s sort has to (1) call the comparison function passed as an argument, whereas C++’s std::sort can inline the comparisons into a single instruction. (1) if the source of the function passed in is visible from…
Re: Beating C with Dyalog APL
#40Earlier quoted context omitted.
The one area where C++ can be a lot faster than C is in places where C uses a function pointer where C++ uses a function template. The standard example is sorting. Say you’re sorting an array of integers. Then, C’s sort has to (1) call the comparison function passed as an argument, whereas C++’s std::sort can inline the comparisons into a single instruction. (1) if the source of the function passed in is visible from…
Right, inlines are hard to beat, and they are not part of the C standard (which is kind of mind boggling, I mean . . . honestly, what year is it?). Still, the benefit of inlines diminishes as the size of the inlined functions increases (you start paying penalties for extra cache lines full of code, and the percentage of time in function call overhead gets small in a hurry). The linker can get into the inlining game,…
The standard talks about visible behaviour of programs, never the concrete implementation.