TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

O(N^2) in CreateProcess

154 pointsby nikbackmabout 6 years ago

9 comments

magicalhippoabout 6 years ago
One thing I really miss in a lot of library documentation is performance guarantees similar to that of the C++ standard library.<p>Yes yes, this method lets me find the index of an element, but is it O(log N) or O(N)? I need to know, otherwise I might inadvertently create O(N^2) code.
评论 #19721199 未加载
评论 #19721272 未加载
评论 #19718577 未加载
评论 #19718246 未加载
nonsinceabout 6 years ago
I absolutely love this series
brucedawsonabout 6 years ago
Update: Microsoft has built a fix for the issue.<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;mamyun&#x2F;status&#x2F;1120878048620892166" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;mamyun&#x2F;status&#x2F;1120878048620892166</a><p>Pretty quick work - two days after the blog post.
peter_d_shermanabout 6 years ago
It looks like the author of this article tested with Windows 7 and Windows 10.<p>What would be really interesting is if the same tests could be performed with all of the other, older versions of Windows... why? Well, then you&#x27;d know the version of Windows in which this phenomena first appears (it could not possibly have existed in Windows 1.0 and probably didn&#x27;t exist until several subsequent versions later). So that knowledge of where it first appears could be interesting... That is, I&#x27;d love a Raymond Chen deep-dive explanation for the Microsoft &quot;why&quot; of this phenomenon...
评论 #19723144 未加载
kristianpabout 6 years ago
This article is about the Control Flow Guard [1] security feature introduced in Win 8.1. The same blog has a few articles about it. Seems that it wasn&#x27;t performance tested against large binaries in its original development.<p>[1] <a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;windows&#x2F;desktop&#x2F;secbp&#x2F;control-flow-guard" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;windows&#x2F;desktop&#x2F;secbp&#x2F;contr...</a>
评论 #19727102 未加载
charleslmungerabout 6 years ago
It&#x27;s very easy to accidentally create O(n^2) code. For example, take a look at the test case added here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;guava&#x2F;commit&#x2F;4e41d621c3f413eb31da2d31b6c9d9713cd851f6" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;guava&#x2F;commit&#x2F;4e41d621c3f413eb31da2...</a>
varelazabout 6 years ago
Why someone needs 1000 created processes on one server? I worked with IO and CPU bound tasks and never needed more than ~50 processes, even on very big servers. Is there any practical reason for this (besides pure interest)?
评论 #19719896 未加载
评论 #19721776 未加载
评论 #19719404 未加载
w8rbtabout 6 years ago
O(n^2) is polynomial and perfectly acceptable for many use cases. Basic multiplication is O(n^2), as are many other operations.<p><pre><code> for i = 1 -&gt; n: for j = 1 -&gt; n: do something </code></pre> Although, if the outside n differs in size from the inside n, it should be written O(nm).
评论 #19719261 未加载
评论 #19718277 未加载
rightbyteabout 6 years ago
Maybe he should have split his 120Mb executable into more executables ... or using a sane number of processes.<p>It would be bad to have the OS cover this use case by default.
评论 #19717821 未加载
评论 #19717804 未加载
评论 #19717695 未加载