# The effect on the simulation performance in case using set and get uvm\_config\_db for individual values

**URL:** <https://verificationacademy.com/forums/t/the-effect-on-the-simulation-performance-in-case-using-set-and-get-uvm-config-db-for-individual-values/32740>\
**Category:** UVM\
**Tags:** UVM, uvm-uvm\_config\_db\
**Created:** [January 11, 2017, 2:41pm UTC](https://verificationacademy.com/forums/t/the-effect-on-the-simulation-performance-in-case-using-set-and-get-uvm-config-db-for-individual-values/32740 "2017-01-11T14:41:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saritr](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Post date:** [January 11, 2017, 2:41pm UTC](https://verificationacademy.com/forums/t/the-effect-on-the-simulation-performance-in-case-using-set-and-get-uvm-config-db-for-individual-values/32740/1 "2017-01-11T14:41:30Z")

</div>

I configure the following in the test file:

```verilog
      uvm_config_db #(int) :: set (uvm_root :: get(), "*", "data_xi_min", 5);
      uvm_config_db #(int) :: set (uvm_root :: get(), "*", "data_xi_max", 12);

```

And do get in one of the transaction function.

I do it for another individual values.

Can it effect on the simulation performance?

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [January 11, 2017, 5:01pm UTC](https://verificationacademy.com/forums/t/the-effect-on-the-simulation-performance-in-case-using-set-and-get-uvm-config-db-for-individual-values/32740/2 "2017-01-11T17:01:55Z")

</div>

_In reply to [saritr](https://verificationacademy.com/forums/t/the-effect-on-the-simulation-performance-in-case-using-set-and-get-uvm-config-db-for-individual-values/32740):_

The problem with the uvm\_config\_db is that the more items you set() into the database, the longer it takes to get() each item. The database is keyed using strings, and has to scan using string string compares. This has been optimized over the year, but there will always be some performance cost based on the number of items in the database.

A much better way of doing this is to create a single configuration object with all the items grouped together for a particular transaction. Then all you have to do is get() one handle to the object for each transaction.
