Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: How fast is fast?

by Logicus (Initiate)
on Aug 07, 2011 at 01:14 UTC ( [id://919012]=note: print w/replies, xml ) Need Help??


in reply to Re: How fast is fast?
in thread How fast is fast?

Nobody should start by buying the sort of hardware you're talking about.

In a few years time it will be available on the budget end of hosting but not everyone thinks that $279/mo is a big budget for anything much really.

I mean have you seen this : http://www.tilera.com/

Get ready for the number of available cores doubling every 18 months and the big players finding a way to keep it scaleable.

Replies are listed 'Best First'.
Re^3: How fast is fast?
by jdporter (Paladin) on Aug 08, 2011 at 16:19 UTC

    Relying upon hardware performance is never a substitute for using the best algorithm. To do so is folly; but when you know nothing of algorithms, it makes some kind of sense to appeal to hardware.

      We used to draw polygons line by line using fixed point maths to avoid the overhead of using floating point maths, prior to the advent of the maths co-processor or FPU.

      These days we direct powerful GPU hardware to draw them for us. There is no way that the algorithms used today could possibly run properly on machines with no GPU, regardless of how well you optimise them. They are far too complex and involve far too much data manipulation.

      The same hardware which accelerates graphics rendering is also usable for regex's. And suddenly with that additional piece of hardware being used, regex's are no longer the slow/stupid way of doing things, but infact the smart way of doing things because you have like 512 processors and several gigs of high-speed ram on your side running those regex's at lightening speed behind the scenes.

      The more of that work you can shift away from the CPU, the better!

      Ps. is it regexes, regex's or regexen? I dunno...

      P.P.s I really hope Perl6 will be the first language to fully exploit that fact!

        The same hardware which accelerates graphics rendering is also usable for regex's.

        This is the first thing I've seen you say that has any technical merit. Embarrassingly parallel gpus definitely could be used to accelerate regex. But there are (at least) three problems with you relying on that to try and make your obscure, messy and frankly, mundane "invention" a viable proposition:

        • To my knowledge -- and I try hard to keep abreast of such developments -- no one has yet coded a regex engine to make use of gpu acceleration.

          And let's face it. It isn't going to be you that does it.

          So you may have a long wait, because of the following reasons.

        • Gpu algorithms run very quickly, but they have to be linear.

          That is, there is considerable overhead in setting up a run. Moving the required data into the gpu and loading its registers with the programs. In order to be effective, the setup costs have to be amortised over runs against large volumes of data that can be processed without decision points.

          Regex aren't like that. They are usually run on relatively small volumes of data -- a few kb of string at most -- and to do much of anything useful, they have to be able to backtrack. And each time they have to back track, you have to reset to the cpu and set up the gpu anew.

          In other words, for the type of processing your toy needs, a gpu accelerated regex engine would be started & stopped so frequently, there would be little if any gain from using it over an efficient single-threaded, iterative cpu implementation.

        • If a regex engine can be coded to use a gpu effectively, a chart parser (like Earley) could also be so coded.

          And as chart parsers are inherently more efficient -- single pass -- than your cobbled-together, many backtracking regex passes, the former will still beat your implementation hands down.

        Your regex implementation can be improved markedly. Indeed I'd achieved an order of magnitude improvement before you pissed me off so badly that I threw it in the bit-bucket and told you where to get off. But that it the least of your troubles.

        The real problem is that you have yet to make any kind of a real case for your "invention", and the cases you have are so full of "believe me"'s and "I know"s and a total lack of any empirical demonstration, that there is simply no basis on which anyone still sympathetic to your cause (are there any?), can justify the expenditure of any effort to pursue it. You just have not made (nor even attempted to make) a solid case for your "invention".

        What would such a case consist of? How about a web shop selling say 100 products (just prod001 -- prod100) that each have a different price (say £1 .. £100; it doesn't have to be realistic), and the user can browse the site, purchase some number of each of several products and you produce a summary screen and total. Post the templates (or whatever you wish to call them), along with the code required to run the site.

        Anti up a realistic demonstration of what your "invention" is capable of, and someone might see some merit in it. Continue to complain that we are all too dumb to perceive your brilliance and no one will.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://919012]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-24 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found