10
votes
1answer
232 views

Bizarre behavior of With, Compile and Break

I'm guessing this is almost certainly a bug in Compile (because they're fairly common), but it's pretty weird and I spent about an hour tracking down the issue and ...
20
votes
1answer
208 views

M9 performance regression for Fold?

I noticed an over 10x performance drop on Mathematica v9.0.1 (as Oleksandr R. commented, also v8) compared with v7.01 for this code: ...
8
votes
2answers
286 views

Goto and Compile

...
11
votes
1answer
218 views

MapIndexed and Compile

I am having trouble compiling a function that uses the MapIndexed function on the second level. The compilation runs fine, but at evaluation time I get an error ...
5
votes
1answer
157 views

Error messages from compiling the Piecewise function

The following works Compile[{{x, _Real}}, Piecewise[{{{0., 0.}, x > 5.}}, {1., 1.}]] but if I enter the Piecewise[...] in ...
8
votes
1answer
265 views

Mathematica8 can compile this function but Mathematica 9 can't if I set CompilationTarget -> “C”

Following code worked on Mathematica 8, but in Mathematica 9 it can't be compiled, it return this message CompiledFunction::cflist: Nontensor object generated; proceeding with uncompiled ...
9
votes
0answers
140 views

Compile not correctly initializing a variable defined inside Module

In the following example, inside the minimumX's Module, x is initialized to 1, but the ...
6
votes
0answers
94 views

Compiled function crashes kernel when trying to list over different length arguments

I'm trying to speed up a tally/binning operation that I have to run many times. I have many lists of between 1 and 10 numbers from the range [1,5] and I want to ...
5
votes
2answers
151 views

CompiledFunction crashes kernel

This crashes my kernel ...
12
votes
2answers
473 views

Using Goto and Label in compiled function?

Below I post some rudimentary code to show that there is something wrong using Goto and Label commands in compiled functions (or I believe there is something wrong). It seems that the command Label is ...
6
votes
1answer
175 views

DistributeDefinitions not working for compiled functions

This is fixed in Mathematica 9.0.0. I'm having trouble with parallel evaluation of compiled functions. Here is a simple example illustrating the problem: ...