How can I optimize recurrent networks in Flux?

Hi,
I posted a question in stackoverflow (https://stackoverflow.com/questions/60123607/how-can-i-optimize-a-recurrent-network-in-julia-with-flux) regarding the performance of Flux in using a recurrent neural network. I have been getting very slow computation results compared to similar code in Mathematica and think there is probably a lot I can do to optimize the timing, but I’m really not sure where to start. Any tips?

Here is the code:

net = Chain(LSTM(8,100), Dense(100,1))

function mapNetworkOverStocks(net, stocksInput)
unFlattened = map(x -> (output = net.(x); Flux.reset!(net); output), stocksInput)
map(x -> map(y -> y[1], x), unFlattened)
end

mapNetworkOverStocks(net, allStocksData)

The actual data (stock data) looks like the following:
image