From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@gmail.com>,
Buildroot List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH] utils/genrandconfig: reduce the maximum "size" of random configurations
Date: Sun, 14 Nov 2021 14:00:55 +0100 [thread overview]
Message-ID: <20211114140055.61997bd6@windsurf> (raw)
In-Reply-To: <20211113180206.GT247986@scaer>
Hello,
On Sat, 13 Nov 2021 19:02:06 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> On IRC, we discussed about using a normal distrobution rather than the
> uniform distribution that randint() provides.
Yeah, but after thinking more about it, I'm wondering whether this
makes sense or not. Indeed, why are we more interested by
configurations having ~10% of options enabled compared to the ones
having 1% or 20% ? All of them are equally interesting, aren't they?
> And here is the (10,7) gaussian (which has my preference):
>
> 1: ############### 3%
> 2: ################# 3%
> 3: #################### 4%
> 4: ####################### 4%
> 5: ######################### 5%
> 6: ########################### 5%
> 7: ############################# 5%
> 8: ############################## 6%
> 9: ############################### 6%
> 10: ############################### 6%
> 11: ############################## 6%
> 12: ############################# 5%
> 13: ########################### 5%
> 14: ######################### 5%
> 15: ####################### 4%
> 16: #################### 4%
> 17: ################# 3%
> 18: ############### 3%
> 19: ############ 2%
> 20: ########## 2%
> 21: ######## 1%
> 22: ###### 1%
> 23: #### 0%
> 24: ### 0%
> 25: ## 0%
> 26: # 0%
> 27: # 0%
I think the reality of Buildroot configurations is probably even more
biased towards having just a few percents of options enabled.
> Since a gaussian can output values all over ℝ, we must limit the range
> explicitly (note that the 0% above are not representing 0 occurences!):
>
> proba = 0
> while proba < 1 or proba > 100:
> proba = int(random.gauss(15, 5))
How much CPU is this loop going to consume before it gives a value that
is within 1 and 100 ? Would a % 100 be better ?
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-11-14 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-13 14:17 [Buildroot] [PATCH] utils/genrandconfig: reduce the maximum "size" of random configurations Thomas Petazzoni
2021-11-13 18:02 ` Yann E. MORIN
2021-11-14 13:00 ` Thomas Petazzoni [this message]
2021-11-14 18:35 ` Yann E. MORIN
2021-11-14 12:48 ` Peter Korsgaard
2021-11-14 13:01 ` Thomas Petazzoni
2021-11-17 22:15 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211114140055.61997bd6@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@buildroot.org \
--cc=romain.naour@gmail.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.