News Toshiba Claims New Algorithm Runs Faster on Desktop PCs than Similar Algorithms on Supercomputers

bit_user

Splendid
Ambassador
I was always told NEVER to use GOTO in programming ... maybe thats why its faster ?
You could write some seriously fast code, using jump tables. Back in the day, at least... but maybe not so much, on modern CPUs.

From a source cited in the article:

Details of the new technology are published in the online academic journal Science Advances.

The Simulated Bifurcation Algorithm harnesses bifurcation phenomena, adiabatic processes, and ergodic processes in classical mechanics to rapidly find highly accurate solutions. Toshiba derived the principle from a theory of a quantum computer proposed by the company itself. This discovery in classical mechanics inspired by quantum mechanics is an academically interesting, highly novel result that suggests the existence of unknown mathematical theorems.

So, um, I think it's more than just GOTO's.
 

bit_user

Splendid
Ambassador
~20 years now (since its dropped, ~50 since introduction).
C still has it.

goto is not optimized by branch prediction
goto should just compile into a jmp instruction. There's nothing to predict - it's not conditional.

so you will ... probably end up with few memory security issues.
There are two basic problems with goto:
  1. It tends to result in messy, hard-to-follow control-flow. This is the main reason it fell out of favor.
  2. It doesn't play well with object scoping, leading to potential memory & resource leaks.
It's not inherently bad for security, although anything which makes code more buggy or harder to understand/maintain will also tend to have security implications.

If you want something that really melts your mind, check out setjmp()/longjmp(). Try using that correctly, in C++.
 
Reactions: Rdslw
Aug 29, 2019
35
7
35
0
I was always told NEVER to use GOTO in programming ... maybe thats why its faster ?
You realize in the end all programming eventually uses GOTO but more specifically JMP instruction in the CPU. But I think you are referring to GOTO in BASIC or specific situation for error handling I C
 

ASK THE COMMUNITY