Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Ampersands and sub speed

by revdiablo (Prior)
on Oct 14, 2005 at 22:16 UTC ( [id://500388]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Ampersands and sub speed
in thread Ampersands and sub speed

But sometimes there's just no getting around calling a function or a method.

And you're trying to run more than 1.4 million method calls per second?

Update: I guess running one method call per byte, this would limit you to 1.4MB/s. Which isn't really all that bad, but could be a problem, I guess. I think it would be more fruitful to redesign the code not to call a method for every byte than it would to try and use a faster type of call, though.

Replies are listed 'Best First'.
Re^4: Ampersands and sub speed
by creamygoodness (Curate) on Oct 14, 2005 at 22:23 UTC

    Say you have an index with a million documents in it. Someone searches for a term that hits 300,000 of them. Calculating the score for each one of them in Java Lucene might involve several tens of method calls. Now imagine a search with 5 terms. This stuff adds up.

    --
    Marvin Humphrey
    Rectangular Research ― http://www.rectangular.com

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found