cartesi / machine-emulator

The off-chain implementation of the Cartesi Machine
GNU Lesser General Public License v3.0
58 stars 32 forks source link

Optimize fdiv and fsqrt instructions for uarch #224

Closed edubart closed 3 months ago

edubart commented 3 months ago

Before:

fdiv.d                                        146.710 MIPS    13264 ucycles
fsqrt.d                                        62.898 MIPS    42852 ucycles

After:

fdiv.d                                        147.184 MIPS    10849 ucycles
fsqrt.d                                        64.180 MIPS    30682 ucycles

As you can see both instructions will use less uarch cycles after this PR.