java - Multiplying Bigintegers in parallel mode -


i want write android code multiplies 10,000 numbers in parallel mode. example divide them groups , multiply each group in thread..((async task)) , multiply results of each group. dont know how it, can help?

use parallel stream.

list<biginteger> integers = new arraylist<>(); // fill data biginteger result = integers.parallelstream()     .reduce(biginteger.one, (a, e) -> a.multiply(e)); system.out.println(result); 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -