Re: RAD vs. performance
- From: "Curtis W" <cwarren89@xxxxxxxxx>
- Date: 28 Jun 2006 16:25:32 -0700
The standard library is a prime example. It's completely conceivableNo. The performance cost of abstraction in OCaml has nothing to do with
inference.
First, yes it does.
In what way? I'm thinking of lack of inlining across functors and the cost
of run-time type dispatch when using parametric polymorphism. These reasons
certainly have nothing to do with inference.
for the compiler to eliminate the dynamic dispatch 99% of the time
through code analysis and inference.
Which is why the standard library is so rigid.Second, I mistated that. I meant to say something
along the lines of:
it would've been possible to completely negate the cost most of the
time through proper inference in the compiler. It's completely possible
to infer when variants are and aren't needed most of the time;
ML programmers don't use variants when they're not needed.
Who says I'm using ML?when
it's not possible, e.g. in circumstances in which complete compilation
would be necessary to find it, the generic case would be used. If it
turns out to be a bottleneck, the language could allow the programmer
to force a specific case, e.g. with a type declaration.
You'll need a more expressive type system if you want to express the use of
a subset of a variant type. Even then, why not just get rid of the boxing
in the ML implementation? You're not going to work to box everything
unnecessarily only to declare that you didn't need to.
How is removing code repetition not a benefit? Honestly, I don't getUnfortunately, rather than doing this, the
compiler writers and language designers simply pushed it off onto the
programmer to do, manually.
What are you talking about? What does the programmer have to do
manually?
Pick the correct function/operator to use.
You always have to pick the correct function/operator to use in any
language. Or are you going back to the numeric tower and saying that if you
have a smaller choice (e.g. if you overload / for int and float division)
then your life is somehow easier.
your point. You've already stated that the standard library is like
that for speed. Are you trying to say it's somehow "better" now, too?
Hehe.
.
- Follow-Ups:
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- References:
- Re: RAD vs. performance
- From: Robbert Haarman
- Re: RAD vs. performance
- From: Dr Jon D Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Dr Jon D Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Dr Jon D Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- Prev by Date: Re: RAD vs. performance
- Next by Date: Re: RAD vs. performance
- Previous by thread: Re: RAD vs. performance
- Next by thread: Re: RAD vs. performance
- Index(es):
Relevant Pages
|