torch/nn — pull request #96 by kaishengtai (2014-11-09 21:16:10+00:00)
Title: Performance improvement to LookupTable 

Eliminating for-loops in the forward pass of LookupTable gives a ~60% improvement in speed. New version passes the LookupTable unit test.

Benchmark times on my local machine (2.5GHz i7): 5.6s before, 2.2s after.

Benchmark code:

```
require('.')
require('sys')

local l = nn.LookupTable(1000, 100)
local start = sys.clock()

for i = 1, 1000 do
local input = torch.randperm(1000)
l:forward(input)
local batchInput = torch.randperm(1000):resize(100, 10)
l:forward(batchInput)
end

print(sys.clock() - start)
```

Also changed the include path in init.lua to reflect the new path to test.lua.