Talk:Speculative execution

Eager execution
The article claims that generating the list [0..1000000] with eager evaluation is inefficient. Why is this? Can anyone elaborate or supply a reference? Thanks -A

Speculative execution can be used for many purposes
"Speculative execution is a performance optimization."

This is not true. Although performance optimization is the most usual objective there are others. Here you can find a system that uses speculative execution for another objective:

https://eprints.kfupm.edu.sa/37726/1/37726.pdf

They use speculative execution to implement the try .. catch block as a transaction. In Java when you enter a try .. catch block and an exception is launched the side effects made to data structures are not removed. It is very much like a "goto -> exception".

Instead of doing that they speculate there won't be any exceptions during execution. If there isn't any exception at the end of execution of the try .. catch block than we proceed execution. Otherwise, if there is an exception, we abort the execution inside the try .. catch block, leaving no side effects. This is very much like if you have a memory transaction that starts with try and ends with catch. Note that there isn't any performance enhancement compared to the usual try .. catch block. —Preceding unsigned comment added by 89.180.165.183 (talk) 14:02, 10 July 2009 (UTC)


 * I can't read the PDF you have linked since it requires registration, but note that speculative execution must be implemented in transactional style, because it has to be rolled back if the speculation is incorrect. Otherwise, the execution wouldn't be speculative. Modern CPUs in fact have to implement the type of data rollback that you describe, because they cannot speculatively execute operations that are publicly visible and would change program operation. In particular, memory writes are usually held in a load/store queue and cannot be committed until the speculation has been confirmed. 24.4.198.162 (talk) 12:00, 29 December 2010 (UTC)

Processors
"It turns out that in order to improve performance and utilization of computer resources, some instructions have to be scheduled ahead of time in a place that is not determined that such instructions have to be executed at all, ahead of branch.[3]"

Am I the only one who doesn't understand this statement? I've read it a couple of times, and I still don't understand it. —Preceding unsigned comment added by Runesvend (talk • contribs) 19:15, 16 May 2011 (UTC)

Side-channel Speculative execution Timing attack
These long-standing critical vulnerabilities in basic modern computing CPU technology were sudden discovered independently by multiple researchers in 2017, after lying dormant for over twenty years. Please add information about why these kinds of problems are just now being uncovered. Are there recent new approaches to looking for these?-73.61.15.235 (talk) 20:27, 5 January 2018 (UTC)
 * Spectre was discovered independently by ...
 * Meltdown was discovered independently by ...


 * About these... While the Meltdown/Spectre stuff is ongoing, and I haven't exactly been fastidious in sourcing it or spreading it onto this page...I'd still hope any potential problems are first and foremost addressed by bettering the article, and not deleting text wholesale. I for one have tried to take out any untenable claims I've bumped into.
 * Yet also leave be some; this stuff really is as bad as it sounds, and why it is so is readily discernible from the original papers, now publicly available. When they say these exploits can read your private data, they aren't kidding: the Meltdown paper boasts the capability of their exploit reading the whole kernel memory of a system at about 500KB/s. In random order, if you want that, so that you can read any security sensitive addresses first if you just know where to look.
 * That's not something whose ramifications we don't yet know. No, it's a verified end-of-the-world, as far as computer security goes under any system amenable to be attack. Decoy (talk) 05:29, 6 January 2018 (UTC)

What workloads are most benefited by Speculative execution and why?
This is one thing I would expect to see here, and I don't. Most of the document refers to the vulnerabilities which each have their own Wiki entries -- those should just be referenced. RowanHawkins (talk) 16:13, 7 May 2018 (UTC)
 * It is a complex question, but in general almost all branch heavy workloads benefit from speculative execution. Which is almost all workloads. 81.6.34.246 (talk) 11:50, 19 November 2018 (UTC)