Hacker News new | past | comments | ask | show | jobs | submit login

About "optimization", Gates likely had a point. That problem of assigning code blocks (subroutines/functions) to memory segments does suggest a significant role for optimization.

What is optimization? For a very sparse description, for the set R of real numbers, positive integers m and n, functions f: R^n --> R and g: R^n --> R^m, find x in R^n to solve

minimize f(x)

subject to

g(x) >= 0

So, set up a mathematical description of the problem based mostly just on the 'cost' function f, that is, what want to minimize, and 'constraints' g that keep the solution 'feasible', that is, realistic for the real problem. Then look for a solution x. Yes, easily enough such problems can be in NP-complete and still difficult otherwise.

Likely what Gates wanted was function f to be the execution time and function g to force honoring the 64KB limit per segment, etc.

Then a big question would be, assuming what software to have its segments assigned?

So, for an answer, just take some Windows and/or Office code and get the total execution time on a typical workload.

Might also want to be sure that on any of several workloads, the optimal solution was no worse than some factor p in R of the best solution just for that workload. Then keep lowering p until the f(x) starts to rise significantly and come up with a curve of f(x) as a function of p. Present the curve to Gates and have him pick a point.

Gee, should we rule out having the same subroutine/function in more than one segment? Hmm ....

Just where Gates learned about optimization would be a question, but he had a point.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: