MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PowerShell/comments/d3byf0/powershell_all_the_things/f04eupd/?context=3
r/PowerShell • u/Helios479 • Sep 12 '19
26 comments sorted by
View all comments
0
[deleted]
0 u/[deleted] Sep 13 '19 [deleted] 2 u/empty_other Sep 13 '19 1..999 | % { (1,0|Get-Random)} | Join-StringRandom binary generator! :P 2 u/BlitzThunderWolf Nov 29 '19 edited Nov 29 '19 Wouldn't it be more efficient to use get-random without a pipe? Like: get-random 0,1Edit: I tested it and was wrong 1 u/empty_other Nov 29 '19 You are right, your way is slightly faster on my system. Around 2% faster. 2 u/BlitzThunderWolf Nov 29 '19 Your way was faster on my system by like 100ms lol
2 u/empty_other Sep 13 '19 1..999 | % { (1,0|Get-Random)} | Join-StringRandom binary generator! :P 2 u/BlitzThunderWolf Nov 29 '19 edited Nov 29 '19 Wouldn't it be more efficient to use get-random without a pipe? Like: get-random 0,1Edit: I tested it and was wrong 1 u/empty_other Nov 29 '19 You are right, your way is slightly faster on my system. Around 2% faster. 2 u/BlitzThunderWolf Nov 29 '19 Your way was faster on my system by like 100ms lol
2
1..999 | % { (1,0|Get-Random)} | Join-String
Random binary generator! :P
2 u/BlitzThunderWolf Nov 29 '19 edited Nov 29 '19 Wouldn't it be more efficient to use get-random without a pipe? Like: get-random 0,1Edit: I tested it and was wrong 1 u/empty_other Nov 29 '19 You are right, your way is slightly faster on my system. Around 2% faster. 2 u/BlitzThunderWolf Nov 29 '19 Your way was faster on my system by like 100ms lol
Wouldn't it be more efficient to use get-random without a pipe? Like: get-random 0,1
Edit: I tested it and was wrong
1 u/empty_other Nov 29 '19 You are right, your way is slightly faster on my system. Around 2% faster. 2 u/BlitzThunderWolf Nov 29 '19 Your way was faster on my system by like 100ms lol
1
You are right, your way is slightly faster on my system. Around 2% faster.
2 u/BlitzThunderWolf Nov 29 '19 Your way was faster on my system by like 100ms lol
Your way was faster on my system by like 100ms lol
0
u/[deleted] Sep 12 '19
[deleted]