Skip to main content
9 events
when toggle format what by license comment
Aug 28, 2013 at 15:12 comment added Szabolcs @matheorem I don't remember what I tried when I wrote this. However, I tried again what happens with different options today. Assuming that "InlineExternalDefinitions" -> True, with the default "InlineCompiledFunctions" -> Automatic, small compiled functions get inlined. With False they don't get inlined. According to the docs, you need the True setting to ensure that all compiled functions will get inlined, not just small ones.
Aug 28, 2013 at 8:31 comment added matheorem @Szabolcs Why you said "If f and g are compiled functions themselves, use the "InlineCompiledFunctions" -> True option as well."? I don't see this option is necessary. InlineExternalDefinitions is enough.
May 4, 2013 at 14:50 comment added Szabolcs @FaysalAberkane You're right, it won't handle nested functions.
May 4, 2013 at 9:10 comment added faysou Pure functions are fine for simple functions, but don't solve more complex cases, for example if f or g contain calls to other functions.
May 3, 2013 at 17:19 history edited Szabolcs CC BY-SA 3.0
added 337 characters in body
May 3, 2013 at 16:13 comment added Leonid Shifrin @Szabolcs Since you mentioned "InlineExternalDefinitions", you may as well mention "InlineCompiledFunctions", which is logically related (although more tangential here).
May 3, 2013 at 16:12 comment added Leonid Shifrin @J.M. Because in general it may have conditions on patterns, so that those definitions can not be expanded. Besides, one function may have several separate definitions with SetDelayed. In general, rule-based functions are currently non-compilable. One of the main reasons is that pattern-matcher is dynamic (data-dependent and also calls main evaluator when Condition or PatternTest are present), and so pattern-matching can not be done at compile-time, or even compiled to something efficient, without additional information which is only available at run-time. JIT might be possible though.
May 3, 2013 at 16:08 comment added J. M.'s missing motivation I do wonder why defining with SetDelayed[] doesn't work as I thought it should...
May 3, 2013 at 16:00 history answered Szabolcs CC BY-SA 3.0