Skip to main content
8 events
when toggle format what by license comment
Apr 13, 2017 at 12:55 history edited CommunityBot
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Feb 13, 2012 at 9:28 comment added Leonid Shifrin @halirutan Yes, that would make sense. Also, you may just use it on its own (take the C code), if you link against Wolfram RTL - so in some cases having everything inside Compile is good.
Feb 13, 2012 at 8:37 history edited halirutan CC BY-SA 3.0
added 315 characters in body
Feb 13, 2012 at 8:29 comment added halirutan @LeonidShifrin Yes, the problem is not one of the nicest. It's badly parallelizable and can be implemented with Tensor-transformations which are fast even without Compile. One advantage of having it all inside compiled code is, that you can now easily call it on several data-sets in parallel.
Feb 13, 2012 at 6:37 comment added Leonid Shifrin +1 for the idea. Note however that your code, when uncompiled (top-level), runs only twice slower. This is because top-level Sort with default comparison function is so efficient that does not benefit from compilation at all. The two-fold speedup is because here Table does benefit from compilation. In this case, you can take the line Transpose[Sort[Reverse /@ lst]] to the top-level, compile the rest, and get identical performance. My point is that compilation is most effective when you know which pieces will benefit from it the most. One big Compile should not be the goal IMO.
Feb 13, 2012 at 0:19 comment added halirutan Yes, probably. The nice thing here is IMO only, that a lot of highlevel functions are used and everything is done in compiled code.
Feb 12, 2012 at 23:15 comment added acl This seems a bit slower than the other compiled solutions, which is strange (maybe because of the CopyTensors?).
Feb 12, 2012 at 22:55 history answered halirutan CC BY-SA 3.0