I am building option valuation (binomial tree) using java . My binomial tree with normal sequential code with 1000 steps takes 0.1 second . But when i try to run it using parallel it takes about 65 seconds . Any suggestion and input will be appreciated..
Binomial Thread is my class which does the calultion
ThreadPoolExecutor threadExecutor = new ThreadPoolExecutor(10000, 10000, 500,
TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),
new ThreadPoolExecutor.CallerRunsPolicy());
for (int i = 0; i < 10000; i++) {
Runnable thread = new BinomialThread();
threadExecutor.execute(thread);
}