POV-Ray : Newsgroups : povray.off-topic : Numeric performance Server Time
6 Sep 2024 11:17:36 EDT (-0400)
  Numeric performance (Message 21 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: andrel
Subject: Re: Numeric performance
Date: 16 Feb 2009 17:04:54
Message: <4999E305.4030602@hotmail.com>
On 15-2-2009 21:15, Orchid XP v8 wrote:
>>> If I add up a few thousand 32-bit signed integers, it takes 20 seconds.
>>
>>   What are you using? A 8086? In fact, I think even a 8086 could sum
>> a lot more than a few thousands of integers in 20 seconds.
> 
> You understand that when I said "a few thousand", I just meant "a lot", 
> right? I wasn't being rigorous about the number.
> 
> Actually the number I'm using is 10^8, which is... er, let me see... 100 
> million?

note to self: never lend money to that guy.


Post a reply to this message

From: Invisible
Subject: Re: Numeric performance
Date: 17 Feb 2009 04:25:27
Message: <499a8287$1@news.povray.org>
Invisible wrote:
> I am now the laughing stock of this forum. Nobody is ever doing to take 
> anything I say about Haskell seriously ever again. Even better, when I 
> asked about this in the Haskell forum, I got yelled at for being a 
> troll. (Again.)

Last night, I wrote a carefully worded reply to the Haskell mailing 
list. As of now, the moderators still haven't released the message yet. 
So to everybody on the list, it looks like I posted a bunch of 
misinformation, got called on it, and just didn't bother to reply. Yay 
for me. :-(


Post a reply to this message

From: Invisible
Subject: Re: Numeric performance
Date: 17 Feb 2009 04:38:57
Message: <499a85b1$1@news.povray.org>
Chambers wrote:

> I can't say what the slowdown is, or why it's occurring, unless I saw 
> your actual Haskell code.  Most likely there's a very good reason for 
> the performance hit.

"GHC currently does not fuse left folds."

Since my entire program was a simple left fold, that'll be the problem. 
(This also explains why the hand-fused version runs much faster - 
although I'm still not sure how it manages to be *faster* than C...)

>> The irony, the sheer irony of it, is that the whole reason I was timing
>> this stuff in the first place was that I was just about to reach into
>> the source code of the compiler to try to tweak its performance. It is
> 
> Actually, that's a great idea.  There's no better way to learn than by 
> doing.

Sure. Like anybody is going to accept a compiler modification from a 
"troll". Like any of the compiler developers are going to be eager to 
help one out. Indeed, the person who yelled at me was the very guy I 
wanted to ask for help from; he's the one who reported the issue I was 
looking at fixing.

>> obvious to me now that I shouldn't be let anywhere near an actual
>> compiler. Better to leave that to the real experts.
> 
> Do you know what an "expert" really is?  An "ex" is a has-been, and a 
> "spert" is a drip under pressure!
> 
> Anyway, how do you think the "experts" got to be that way?  By doing 
> exactly what you're doing right now!

Well, we're talking about people such as the legendary Simon Peyton 
Jones, one of the original PhDs who *invented* Haskell. People who know 
what "denotional semantics" actually means, and what "the lambda cube" 
is. They didn't get to where they are by blindly poking around somebody 
else's source code. They did it by spending decades in research and 
development on programming language design, compiler architecturing, 
applied mathematics, and things I'd never understand in my wildest dreams.

>> It seems I've been deluding myself. All these years, I thought I was
>> some kind of master programmer.
> 
> Well, you might have been deluding yourself in that, yes.  But there's 
> nothing wrong with aspirations :)

There's nothing wrong with *wanting* to become a master. There's 
everything wrong with believing you *are* a master in the complete 
absence of any evidence for this.

>> I am now the laughing stock of this forum.
> 
> No, you're not.  You're our friend and, yes, sometimes we laugh at you - 
> but we laugh at pretty much everyone.  As Scott Adams says, "Everyone is 
> an idiot at something."  That means that everyone gets to be laughed at 
> :)  Take it in stride, and join in the laughter yourself - you might 
> find it cathartic.

Well, let me put it this way: Next time I say "Haskell is fast", nobody 
is going to believe me for even a split second. So basically what I've 
been saying all these years is nonesense.

>> seems everywhere I do, people yell at me for being immature and
> 
> They yell at you for being immature?  Doesn't that make them... immature?

Well, I say "yell" at me... Of course they put it more professionally 
than that. But the gist of it is that they think I'm a troll and they 
don't want me around.

> [2]If Haskell can be embedded, I'm thinking it would make a great patch 
> for POV-Ray.  Something like this:
> 
> #declare h_func = haskell { "..." }
> 
> #declare val = h_func(1,2,3)
> 
> Anywhere POV takes functions, it could use a Haskell function.

I'm not sure that would be such a hot idea.

   #declare angleR = angleD / 180 * pi;
   #declare angleR = haskell{"fromIntegral angleD / 180 * pi"};

   #declare center = <1, 2, 3>;
   #declare center = haskell{Vector3 1 2 3};

   #declare T1 = texture {pigment {red 1} finish {ambient 0}}
   #declare T1 = haskell{default_texture {pigment = PSolid {colour = 
ColourRGB 1 0 0}, finish = Finish {ambient = ColourRGB 0 0 0}}};

Not so great, eh?

What you *could* do - and what I attempted to do a while back - is 
design a domain-specific language for scene description/construction. It 
would be completely incompatible with POV-Ray's current SDL, but it 
might be quite nice.

OTOH, if you were going to do that, everybody would want an 
object-oritented language rather than a functional one.


Post a reply to this message

From: Chambers
Subject: Re: Numeric performance
Date: 17 Feb 2009 10:06:35
Message: <499ad27b$1@news.povray.org>
On 2/17/2009 1:25 AM, Invisible wrote:
> Invisible wrote:
>> I am now the laughing stock of this forum. Nobody is ever doing to
>> take anything I say about Haskell seriously ever again. Even better,
>> when I asked about this in the Haskell forum, I got yelled at for
>> being a troll. (Again.)
>
> Last night, I wrote a carefully worded reply to the Haskell mailing
> list. As of now, the moderators still haven't released the message yet.
> So to everybody on the list, it looks like I posted a bunch of
> misinformation, got called on it, and just didn't bother to reply. Yay
> for me. :-(

Ah, the joys of moderated groups :(

-- 
...Chambers
www.pacificwebguy.com


Post a reply to this message

From: Invisible
Subject: Re: Numeric performance
Date: 17 Feb 2009 10:07:47
Message: <499ad2c3$1@news.povray.org>
>>> I am now the laughing stock of this forum. Nobody is ever doing to
>>> take anything I say about Haskell seriously ever again. Even better,
>>> when I asked about this in the Haskell forum, I got yelled at for
>>> being a troll. (Again.)
>>
>> Last night, I wrote a carefully worded reply to the Haskell mailing
>> list. As of now, the moderators still haven't released the message yet.
>> So to everybody on the list, it looks like I posted a bunch of
>> misinformation, got called on it, and just didn't bother to reply. Yay
>> for me. :-(
> 
> Ah, the joys of moderated groups :(

That's the fun thing. It's *not* a moderated group. (So... why are my 
posts being moderated??)


Post a reply to this message

From: Orchid XP v8
Subject: Re: Numeric performance
Date: 17 Feb 2009 14:41:29
Message: <499b12e9$1@news.povray.org>
>> Ah, the joys of moderated groups :(
> 
> That's the fun thing. It's *not* a moderated group. (So... why are my 
> posts being moderated??)

Well look at that... I sent an email to the list administrator, and 
*within minutes* several emails a sent a few days ago have suddenly 
appeared on the mailing list! How "interesting"... :-P

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.