# Questions tagged [function-comparison]

For topics about very similar functions. Use this tag for questions that are about to resolve differences between two or more functionalities.

44 questions
36 views

98 views

### Is there a meaningful difference between two ways of writing a Manipulate expression?

What is the difference between Manipulate[Graphics[Disk[{x, 0}, 1], Axes -> True], {x, 0, 10}] and ...
185 views

### Listable built-in functions - Why are they so fast on numerical vectors?

Consider the following small example, where I calculate Exp on a large vector by employing the listability which many mathematical built-in functions have: ...
63 views

### Export/Put and Import/Get

I have questions about importing and exporting that don't seem to have up-to-date answers anywhere. What's the difference between Export and Put? Which should I use if I care about how long it takes ...
37 views

### Is there any reason to use FindFit over NonlinearModelFit? [duplicate]

Given that FindFit seems to just be able to return estimated coefficients and none of the other goodies (standard errors, confidence bands, residuals, etc.), under ...
156 views

### Difference between Import and Get of mx file

The documentation says Import["file.mx"] is equivalent to Get["file.mx"] . However, I have at least one instance where <...
294 views

### Why use pure functions?

I've now read the official documentation of wolfram on (anonymous) pure functions, and the part about (anonymous) pure functions in the book "mathematica programming intro". I believe I understand ...
133 views

### ListStepPlot vs ListLinePlot

When I plot the data I have using ListStepPlot and ListLinePlot[data,InterpolationOrder -> 0] I am getting two different plot....
157 views

### Classify vs LogitModelFit

Can someone explain me what is the difference between Classify[trainingset, Method -> "LogisticRegression"] function and ...
928 views

### What are the counterparts in Wolfram to left and right division of a matrix in other programming language, e.g. Julia and MATLAB?

Sometimes, to find the inverse of a matrix is a labor-consuming task, or even "disgusting", especially when the matrix is "ill". It is said, e.g. in Julia, that the left/right division operation is ...
191 views

### Derivative of list of points: DifferentiatorFilter versus DerivativeFilter

I need to calculate the derivative from a list of experimental points. Mathematica has two functions which seem to do this: DifferentiatorFilter and DerivativeFilter. Which one is better for ...
285 views

### Difference between UnitStep and HeavisideTheta?

In Mathematica, UnitStep[0] == 1 and HeavisideTheta[0] remains unevaluated. In addition, ...
214 views

### Reconstructing ContourPlot with ListContourPlot

Let f be some numeric function with two arguments f[x_?NumericQ, y_?NumericQ] := x y For the purposes of this question ...
77 views

### ContourPlot ClippingStyle?

In Plot3D, Mathematica by default imposes a scheme for clipping the plot if it exceeds the PlotRange. You can change the default ...
60 views

### Performance issue of Merge function

I am using mma 11.0.1 This post is related to my previous faster way to merge data. enlightened by Edmund's answer, I found a subtle performance issue of Merge ...
2k views

### Why is Plus so much slower than Total?

Why is Plus so much slower than Total for summing lists? ...
280 views

### Begin[“Private”] vs Module

So, if you have a package formatted like so: ...
107 views

### Difference between Timing, AbsoluteTiming, and Elapsed?

In the picture below, Difference between Timing, AbsoluteTiming, Time and ...
98 views

All these functions seem capable of doing the same things: Import, URLFetch, URLSave, ...
141 views

### What is the point of StringForm?

I never really understood the point of StringForm returning a StringForm rather than a String...
2k views

### Is manual adjustment of AccuracyGoal and PrecisionGoal useless?

This is a problem confusing me for years. AccuracyGoal and PrecisionGoal are two options that I never truly understand and, to ...
477 views

### Good clearing practices

I have been using Mathematica for about 2 years and I'm pretty ok to write and optimize my code. Wanting to improve my practice, I often look at code examples. However, I can not determine if there is ...
131 views

### Difference between Initialization Cell and Group

Is there a difference between setting a Cell or a Group of cells to be an Initialization Cell...
114 views

### Difference between StringJoin and StringExpression

When does one need StringJoin as opposed to StringExpression? I don't know of an example where ...
594 views

### Defer, Hold, Unevaluated, Inactivate — which one when?

What are some guidelines on which function to select from among the superficially similar functions Defer, Hold, ...
686 views

### What is the difference between MathLink and WSTP? Which one should I use?

What is the difference between MathLink and WSTP programs? Will the use of MathLink protocol be maintained or not?
525 views

### Choose between Apply and Map

Even though this might be too general question(or not answerable), I want to get some advice here. I apologize in advance if it is not a relevant question. I frequently have to process large list of ...
752 views

### Difference between Evaluation ► Quit Kernel and Quit[]

What is the difference between Evaluation ► Quit Kernel and Quit[]? Both seem to quit the kernel (and clearing all definitions)...
855 views

### Why some built-in functions are slow

I just wonder why some built-in functions are slower compared to some other ways using more than one built-in functions for doing same job. consider this example: ...
673 views

### Product of elements of a list

Sum is for functions; Total is for a list. Product is for a function; what is the command ...
1k views

### What's the difference between Inactive and HoldForm?

In version 10, Mathematica not only added Inactive / Activate but also highlighted this change in the "New in 10" page (in Core ...
5k views

### Scan vs. Map vs. Apply

I cannot understand the difference between Apply, Scan, and Map. I have tried to play with ...
537 views

### Why is multidimensional Reverse slow?

Bug introduced in 6.0 or earlier and persisting through 11.1.1 or later I have found that multidimensional Reverse is ~10 times slower than exact ...
2k views

### Two ways to map a function on a list: Which one is faster?

There are two ways to make a function listable on the list: Use Map or use SetAttributes. My question is, which one is faster, ...
4k views

### when is f@g not the same as f[g]?

I have always thought that f@g will give the same result as f[g] in all cases, and it is just a matter of style which one to use ...
187 views

### Difference between Directory[] and NotebookDirectory[] .. a trailing /?

The following was the code: Directory[] NotebookDirectory[] The output was ...
732 views

### What are the known differences between Save and DumpSave, and how to account for them?

Edit: I changed the title and (slightly) the wording of this question in order to make it more easily answerable. If I evaluate this in Mathematica 9: ...
18k views

### What is the difference between Reduce and Solve?

Solve and Reduce both can be used for solving equations. Just by working with them, I know there are some differences between ...
666 views

### What is the point of Refresh if Dynamic has an UpdateInterval option?

I haven't found an example where I can't get rid of Refresh[]: ...
5k views

### Difference between AbsoluteTiming and Timing

I need to evaluate the efficiency of my code. Therefore I would like to evaluate the time the code need for some calculations. Mathematica gives me two possibilities for this kind of evaluation: <...
1k views

### When to use Get vs Needs

When should I use << vs Needs? I just always use Needs as ...
726 views

### Part extraction vs functions like First, Last?

There are many ways to extract different parts of lists in Mathematica. For example, the first part of a list v can be accessed either as ...