I was referring to UVM testbench speed-up article where i found below code:
//High performance code
class generate_seq extends uvm_sequence#(seq_item);
task body;
seq_item orig_item =seq_item::type_id::create("item");
seq_item item;
repeat(200) begin
$cast(item, orig_item.clone());
start_item(item);
assert(item.randomize());
finish_item(item);
endtask
endclass
What is the need of cloning orig_item? If i am passing orig_item directly to start_item() then also i am seeing different values in transaction.