Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^8: Faster creation of Arrays in XS?

by wollmers (Scribe)
on Jun 23, 2015 at 07:19 UTC ( [id://1131578]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Faster creation of Arrays in XS?
in thread Faster creation of Arrays in XS?

BrowserUK: Thanks for the code examples and ideas. For me this is also a nice example of using Inline (the first time for me). I only had to change unsigned __int64 bits in code>diffBits</code> which my toolchain (Mac OSX) can not handle.

The problem with that benchmark is it only tests the call to the functions; not the subsequent accessing of the returned information.

The benchmarks of diff implementations mentioned in my blog return all the same: a reference to an AoA. If they return the same, I need not care about subsequent accessing. The exception is String::Similarity with (fast) strings as input, without constructing the aligment, and returning only one number. It's only there for showing an upper limit

Replies are listed 'Best First'.
Re^9: Faster creation of Arrays in XS?
by BrowserUk (Patriarch) on Jun 23, 2015 at 11:39 UTC
    For me this is also a nice example of using Inline (the first time for me).

    YW. Tip. If you keep the number of line preceding the I::C code to 4 (as in my examples), then you'll find that the line numbers produced by the compiler in warnings and errors match those in the .pl file exactly; which is infinitely more convenient than have to backtrack them from generated .c file via the generated .xs file, both of which get stuck away in some obscure directory.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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.
    I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-29 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found