Skip to main content
added 41 characters in body
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

Problem remains in 10.1Bug introduced in V10.1 or earlier and persists through 11.2


Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

Problem remains in 10.1


Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

Bug introduced in V10.1 or earlier and persists through 11.2


Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

Problem remains in 10.1


Earlier Kuba notedKuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

Problem remains in 10.1


Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

Problem remains in 10.1


Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

added 43 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

Problem remains in 10.1


Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

Problem remains in 10.1


Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# < 0.5, "CoffeeTones", "DeepSeaColors"]][#] &;

Now its use to colorize a random array:

Colorize[
 RandomInteger[99, {100, 100}],
 ColorFunction -> fn
] // AbsoluteTiming

enter image description here

This is conspicuously slow for such a simple operation. Interestingly this has nothing to do with Colorize or how it uses fn; it is inherent to fn itself:

fn /@ RandomReal[1, 100^2] // AbsoluteTiming // First
4.746

What's going on?

edited tags
Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Loading
Tweeted twitter.com/#!/StackMma/status/573818149998624768
added 3 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Loading
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Loading