News for hackers. Stuff that matters.
Re:One million lines of code ought to be enough for anybody by rwmj on Wednesday December 18, 2019 @12:25PM (#21827115)
But what proportion of the Python interpreter's memory is consumed storing line numbers? How much slower will it run if it has to unpack the numbers any time it needs to use them? Does Python even store triplets of line numbers? (This seems unlikely to me, so to achieve any saving at all will require invasive code changes.) These questions could be answered with hard data, but the proposal has no data at all.
Re:One million lines of code ought to be enough for anybody by ModernMech on Wednesday December 18, 2019 @02:36PM (#21828442)
> But what proportion of the Python interpreter's memory is consumed storing line numbers?

I don't think the packing part was talking just about line numbers. They propose a number of things that would be limited to 1e6 elements. The question about performance is a good one and needs to be studied. This proposal is arguing from a different perspective though, one that focuses on reducing ambiguity rather than optimizing for performance. Python as a language is an exercise in sacrificing performance for other objectives, so I think that's fine for a language like this to consider this question even if it means performance could be impacted negatively.