Hello,
I was thinking about using haskell to do some 'realtime' audio signal
processing, and am trying to figure out how close to the holy grail of
"C" code I can get when it comes to speed. Currently, it looks like I
might be looking at running 10 times slower. Is there stuff I could do
to get be
[EMAIL PROTECTED] (Hans Nikolaus Beck) writes:
> type GLVertex = (GLfloat,GLfloat,GLfloat)
>> toVertex :: GLVertex -> Vertex3 GLfloat
>> toVertex :: (a,a,a) -> Vertex3 a
> Yes this works (the first variant). Thanks ! But I must say that I
> have problems to understand
The problem is that you
John Meacham wrote:
I was wondering if:
case x of
"foo" -> Foo
"bar" -> Bar
"fuzz" -> Fuzz
"fuzo" -> Fuzo
x -> other .. thing
would optimize to
let z = other .. thing in
case x of
('f':x) -> case x of
('u':'z': x) ->
Hi,
The type signature is wrong. Try this..
toVertex :: GLVertex -> Vertex3 GLfloat
or perhaps..
toVertex :: (a,a,a) -> Vertex3 a
Regards
Yes this works (the first variant). Thanks ! But I must say that I have
problems to understand the class mechanism in its full extend
Greetings
Hans
_
On Sunday 22 Feb 2004 10:03 am, Hans Nikolaus Beck wrote:
> Hi,
>
> I have the following problem:
>
> Vertex3 ist defined as
>
> data Vertex3 a = Vertex3 a a a
>
> a is defined as
>
> class a VertexComponent
>
> But I fail to write to following correct
>
> type GLVertex = (GLfloat, GLfloat, GLfloat
Hi,
I have the following problem:
Vertex3 ist defined as
data Vertex3 a = Vertex3 a a a
a is defined as
class a VertexComponent
But I fail to write to following correct
type GLVertex = (GLfloat, GLfloat, GLfloat)
toVertex :: GLVertex -> Vertex3 a how do it correctly
toVertex (x,
John Meacham <[EMAIL PROTECTED]> writes:
> The reason I ask is I am writing someting which will generate large case
> statements [over strings] and want to know if I should bother
> pre-optimizing it to [search tries]ยน
I've no idea what compilers do, but one quick-and-dirty way to
optimize this c
I was wondering if:
case x of
"foo" -> Foo
"bar" -> Bar
"fuzz" -> Fuzz
"fuzo" -> Fuzo
x -> other .. thing
would optimize to
let z = other .. thing in
case x of
('f':x) -> case x of
('u':'z': x) ->
"z" -> F