Sunday, November 08, 2009

Last post and more...

Well, I got through the problem I was having with Haskell. It was just a little type mismatch, so it ended up being no biggie. I think the tutorial just confused me a bit.

Now, while doing some work around the house, I was doing some thinking and I don't know if anyone has thought of this yet, but I think we can leverage multi-core processors to enhance single-threaded apps. Now, don't take anything I say as gospel as I'm not a chip designer; I'm just throwing out some ideas that at least I thought were pretty cool.

First, instead of branch prediction, could we instead have multiple cores pre-loaded with the instructions for each branch and just switch to the correct core depending on the result of the branching? In fact, if the processor/compiler is smart enough, it could keep those branches in cores for an extended period of time and just switch between them. This could make processors simpler as you wouldn't have to worry about good branch prediction algorithms and how much space they take up on a CPU.

Second, keeping along those lines, how about pre-loading the bytecode for different functions on different cores? Now when I call a function, I don't have to worry about loading the function every time I call it; it's already in a single core's cache and ready to go.

Lastly, should we look into making multi-core processors more interesting? I'm thinking of mixing one or more specialized cores with multiple general purpose cores. For example, a useful core would be one that can do arbitrary precision math without relying on a normal floating-point unit. Or perhaps a crypto core which is optimized for the various operations that cryptographic algorithms use? Now even if our software isn't threaded/forked, we can leverage multi-core capabilities.

Now, I'm thinking that if the first and second ideas are good that we'd want to have instruction caches on a per-core level and a shared data cache. Also, I'm thinking that many simple cores will work better than few complex cores, which is where we are today with Intel and AMD processors. Regardless, the third idea could be incorporated with either type of multi-core processor.

Thoughts?

Labels: , , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home