Which of these hinders the simulation performance in my testbench and why (Looking for an answer from system verilog compiler perspective):
task A;
wait(dut_if.a==1);
.
.
endtask
OR
task A;
forever @(posedge clk) begin
if(dut_if.a==1)..
end
endtask
PS: "a" is a dut signal which gets asserted at some clock edge during the simulation. Assume this task is called just once.