# Performance Comparison

We will compare boost-histogram to numpy.

```none
[1]:
```

```none
[2]:
```

## Testing setup

This is just a simple 1D and 2D dataset to use for performance runs. The testing setup is the same as “MBP” in [this post](https://iscinumpy.gitlab.io/post/histogram-speeds-in-python/), a dual-core MacBook Pro 2015.

```none
[3]:
```

```none
[4]:
```

### Traditional 1D NumPy Histogram

This is reasonably optimized; it should provide good performance.

```none
[5]:
```

```none
[6]:
```

### Boost histogram 1D

```none
[7]:
```

### Boost histogram 1D NumPy clone

```none
[8]:
```

### Boost histogram in 1D, threaded

```none
[9]:
```

### Boost histogram 1D NumPy clone, threaded

```none
[10]:
```

---

### Traditional 2D NumPy histogram

Not as well optimized for regular filling.

```none
[11]:
```

```none
[12]:
```

### Boost histogram in 2D

```none
[13]:
```

### Boost histogram 2D NumPy clone

```none
[14]:
```

### Boost histogram in 2D, threaded

```none
[15]:
```

### Boost histogram 2D NumPy clone, threaded

```none
[16]:
```
