Bug 1217 - simple-odfm-wimax-phy creates UniformVariable in a critical path
simple-odfm-wimax-phy creates UniformVariable in a critical path
Status: NEW
Product: ns-3
Classification: Unclassified
Component: wimax
ns-3-dev
All All
: P5 enhancement
Assigned To: Flavio Kubota
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-13 11:23 EDT by Claudio
Modified: 2011-07-13 11:23 EDT (History)
1 user (show)

See Also:


Attachments
Mercurial patchset. Import with "hg import <patchfile>" (1.70 KB, patch)
2011-07-13 11:23 EDT, Claudio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Claudio 2011-07-13 11:23:25 EDT
Created attachment 1199 [details]
Mercurial patchset. Import with "hg import <patchfile>"

Just a performance enhancement, with some, yet trivial, impact on simulation results (different RNG sequences used).

simple-odfm-wimax-phy creates a UniformVariable (which initializes an RngStream) repeatedly whenever processing packets. It's inefficient, and I suspect it detracts from the RNG quality to be used like this.

The attached patch adds a private UniformVariable member that's initialized at creation time, instead, which improves performance (and, I believe, quality of the resulting random stream).