In the Solidity implementation intermediate results are emitted as events and final results are stored in the contract storage.
In Substrate we can follow a similar strategy or store these in the chain storage.
Default Approach
Our suggestion depends on the amount of data and the availability requirements.
For less than 100 results we would probably store on-chain.
For (significantly) more results we would opt for a similar strategy of emitting events for all but the final results.
In the Solidity implementation intermediate results are emitted as events and final results are stored in the contract storage.
In Substrate we can follow a similar strategy or store these in the chain storage.
Default Approach
Our suggestion depends on the amount of data and the availability requirements.
For less than 100 results we would probably store on-chain.
For (significantly) more results we would opt for a similar strategy of emitting events for all but the final results.