Is Arraymancer slow or are the examples outdated?
After a long time, I decided to finally learn Arraymancer, and I was really pleased to see that the library has grown much more than I expected! Kudos to all contributors!

I started trying out the neural network example in the README, which features a simple convolutional network to learn MNIST. I ran the example exactly as it is, using `-d:release`, on the CPU.

It seemed to be *really* slow. In the time it was running, I modified a similar example I had in pytorch and started it. The example in pytorch looks like this (it may be not identical, since I just made a quick edit to have the same parameters, but it should be more or less the same)


```python
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
import torchvision.transforms as transforms
from torchvision.datasets.mnist import MNIST
from torch.utils.data import DataLoader
from datasets import TransformedDataset, Slice


class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.conv1 = nn.Conv2d(1, 20, 5)
        self.conv2 = nn.Conv2d(20, 50, 5)
        self.linear1 = nn.Linear(800, 500)
        self.linear2 = nn.Linear(500, 10)

    def forward(self, x):
        batch_size, _, _, _ = x.size()
        x = self.conv1(x)
        x = F.relu(F.max_pool2d(x, 2))
        x = self.conv2(x)
        x = F.relu(F.max_pool2d(x, 2))
        x = x.view(batch_size, 800)
        x = F.relu(self.linear1(x))
        x = self.linear2(x)
        return x

def run_epoch(model, criterion, optimizer, dataloaders, set, train=True):
    model.train(train)

    running_loss = 0.0
    running_corrects = 0
    count = len(dataloaders[set].dataset)

    for data in dataloaders[set]:
        inputs, labels = data
        inputs, labels = Variable(inputs), Variable(labels)

        # Forward pass
        optimizer.zero_grad()
        outputs = model(inputs)
        loss = criterion(outputs, labels)

        # Backward pass
        if train:
            loss.backward()
            optimizer.step()

        # Statistics
        _, preds = torch.max(outputs.data, 1)
        running_loss += loss.data[0]
        running_corrects += torch.sum(preds == labels.data)

    epoch_loss = running_loss / count
    epoch_acc = 100 * running_corrects / count

    print('{} loss: {:.4f} accuracy: {:.2f}%'.format(set, epoch_loss, epoch_acc))


def train(model, criterion, optimizer, dataloaders):
    num_epochs = 5

    for epoch in range(num_epochs):
        print('Epoch {}/{}'.format(epoch + 1, num_epochs))
        print('-' * 10)

        run_epoch(model, criterion, optimizer, dataloaders, 'train', train=True)
        run_epoch(model, criterion, optimizer, dataloaders, 'validation', train=False)

def main():
    torch.manual_seed(1)
    batch_size = 32
    model = Net()

    print(model)

    criterion = nn.CrossEntropyLoss()  # LogSoftmax + ClassNLL Loss
    optimizer = optim.SGD(model.parameters(), lr=1e-3, momentum=0.9)

    mnist = MNIST("data/mnist", train=True, download=True)
    mnist_test = MNIST("data/mnist", train=False, download=True)
    transform = transforms.ToTensor()
    dataset = TransformedDataset(mnist, transform)
    train_size = len(mnist) * 5 // 6
    trainset = Slice(dataset, 0, train_size)
    valset = Slice(dataset, train_size, len(mnist))
    testset = TransformedDataset(mnist_test, transform)
    dataloaders = {
        'train': DataLoader(trainset, batch_size=batch_size, shuffle=True, num_workers=4),
        'validation': DataLoader(valset, batch_size=batch_size, shuffle=True, num_workers=4),
        'test': DataLoader(testset, batch_size=batch_size, shuffle=True, num_workers=4),
    }

    train(model, criterion, optimizer, dataloaders)
    run_epoch(model, criterion, optimizer, dataloaders, 'test', train=False)

if __name__ == '__main__':
    main()
```

This ran noticeably faster - namely 4m14s for 5 epochs, while Arraymancer took 10m.

It seems I am doing something wrong with Arraymancer - or the example is possibly outdated - but I am not really sure :-?