In reply to Omkar:
The technical answer to that question is by far #2.
For every call to ap.write() in your monitor, it goes through at least the following steps
- call uvm_analysis_port::write()
- for-loop through each subscriber
- call uvm_port_base::get_if()
- call uvm_port_base::size() X 2
- call uvm_analysis_imp::write()
- call your_scoreboard::write()
However, since the M in UVM stands for Methodology
, one needs to justify (and document) decisions that go against standard practice. How much time do you think you can save calling the scoreboard's method directly versus the time someone else may have to spend understanding what you are doing? If you start doing everything a different way, you no longer have a standard methodology.
I can guarantee there are many other places in the UVM you could write more optimally yourself. The functionality UVM field automation macros are one example of something we recommend doing yourself because the performance gain is worth it.