Hacker Newsnew | past | comments | ask | show | jobs | submit | keith_analog's commentslogin

If I understand correctly, one of the challenges faced by this graph application relates to the workload being irregular and known only as the computation visits new parts of the graph. There's some work in this direction that might be helpful [1].

[1] https://dl.acm.org/doi/10.1145/2807591.2807651


My favorite quote from Alan Perlis: “Symmetry is a complexity-reducing concept (co-routines include subroutines); seek it everywhere.”


Unfortunately, the symmetry provided by higher levels of your software stack is not always reflected by the lower levels. This causes your symmetry to be created as an abstraction. (Subroutines are more efficient to implement than co-routines on real hardware.) Abstractions are leaky and this, in turn, causes the superficial symmetry to merely mask the underlying asymmetry.

If done exceptionally well, the only visible evidence of the leak will be substantial performance disparities between seemingly symmetric features (well done! this is unusual).

If done with the normal level of software design quality, the evidence will show up as quirky behavior, imperfect symmetry, "well this one always works but the other one is not reentrant", etc.


Yes! Subroutine call is a) allocation of activation record b) switching context c) returning that combines de-alloc and switch. while coroutines have all of these concepts separated. Why not start with a powerful and general concept and optimize for that one?


> Why not start with a powerful and general concept and optimize for that one?

As with basically everything, there are tradeoffs involved. Sometimes restrictions can be helpful for keeping things understandable, which can in turn make optimizations easier to implement. As a rather hamfisted example: completely unrestricted goto. Very general, debatably powerful, but relatively easy to use in a way that makes comprehension difficult. That same generality can also make it difficult to verify that optimizations don't change observable program semantics compared to something more restricted.


Because you can allocate the activation record on the heap, provide a way to reify continuations, and presto! now you have call/cc (and trivially implemented, no less)!

Price paid: a) you need a GC (ok, whatever, sure, you have one), b) well, the performance hit of having to GC activation records (you don't care; others do), c) whoops, thread-safety got much harder and maybe you can't even have threads (imagine two threads executing in the same activation record at the same time!).

That's a very very steep price.


It's amazing how often symmetry shows up as both a design aesthetic and a practical tool for managing complexity


The article makes for an interesting technical read, and points to some very important issues, such as debugging in a multicore environment.

Even so, I encourage anyone reading this article to keep in mind that there is a massive amount of work dedicated to software support for multicore parallelism.

For anyone interested in digging deeper into multicore parallelism, I recommend taking a look at the CMU approach to teaching algorithms [1]. They teach parallel programming to second-year undergraduates by default, and the students even write parallel implementations, which can achieve good parallel speedups on a multicore system.

Moreover, they do it using either a parallel functional language or a parallel library in modern C++.

Importantly, they get this far by largely hiding details of exactly how parallel tasks are scheduled across cores. There's a scheduler that does it, much like there's a garbage collector that frees unused memory in a memory-managed language.

[1] https://www.cs.cmu.edu/~15210/docs/book.pdf


> they do it using either a parallel functional language or a parallel library in modern C++.

IMO this is a weakness not a strength. The approach of Fleury (low level C, no lib), makes his articles a lot more valuable for understanding fundamentals.


I had the good fortune to be in Dybvig’s compilers class in the mid 2000s. The way it was presented really brought the concepts to life and made it enjoyable.


There's a fairly recent study looking into the cost of raising an interrupt. TLDR: the cost on conventional systems is quite high; a significant part of the cost can be eliminated by using a custom kernel; even with a custom kernel, there remains a substantial cost.

https://par.nsf.gov/servlets/purl/10079614

To my knowledge, the remaining cost could be decreased to approximately the same cost as a branch mispredict, but getting there would require changes to the chip hardware and software stack.


> To my knowledge, the remaining cost could be decreased to approximately the same cost as a branch mispredict, but getting there would require changes to the chip hardware and software stack.

Do it even need to be a misprediction?

If you are completely focused on latency then flushing everything else makes sense. But I would think that if you continue execution for now and put a branch instruction into the queue you'd reduce the cost per interrupt even further.


The Redex modeling tool [1] is an interesting point in this space. Its specialty is in making executable specifications of domain-specific languages. Redex models can be tested by the unit-testing framework of the Racket dialect of Scheme. There's plenty of excellent documentation on Redex, and it has some neat visualization tools. I've gotten plenty of value from using it for my research over the years, but suspect it'd be useful outside of academic research.

[1] https://redex.racket-lang.org/


Here's a link to one lobbying org whose mission I believe in.

https://citizensclimatelobby.org/


Great news!


I've been locked out of my Amazon account for a year now, for reasons I don't know. Amazon reps told me I'd hear back, but there's been nothing for months now. Fortunately, the credit card they have on file expired, and the ebooks I can no longer read are not so important to me. So, good riddance, I say.


What would concern me is, for example, if the cost of a transaction grows faster than the price of a given bitcoin in dollars. If that trend would continue for too long, then I suppose my bitcoin could get trapped in the system for an indefinite period of time, that is, from the time I no longer can justify moving the bitcoin because of high transaction fees to the time I can. It seems that this situation suggests a lower bound on the amount that makes sense to store in a bitcoin wallet. I wonder what that lower bound is today.


That has already happened as transaction fees have increased from less than 1 cent to $5.


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

Search: