Search found 11 matches
- 2023-01-31, 10:01:21
- Forum: forwardcom forum
- Topic: Proposals for next version
- Replies: 16
- Views: 111912
Re: Proposals for next version
Why does it require microcode? I mean, microcode would presumably not be faster than a software solution; but presumably it _is_ possible to accelerate with dedicated hardware, no?
- 2023-01-31, 8:17:35
- Forum: forwardcom forum
- Topic: Proposals for next version
- Replies: 16
- Views: 111912
Re: Proposals for next version
Moonchild wrote: vector sum scan instruction I don't understand what you mean. The manual explains how to make a horizontal vector sum. Sum scan of an array [a, b, c, d, ...] is [a, a+b, a+b+c, a+b+c+d, ...]. Having an instruction to do this on a single vector is useful in its own right, and can be...
- 2023-01-26, 9:45:56
- Forum: forwardcom forum
- Topic: Bit addressing
- Replies: 8
- Views: 43128
Re: Bit addressing
One-off bit operations are, I think, common enough to be worth supporting; sieve of eratosthenes is a bit of a strawman, but consider tracing gc as a case that would benefit appreciably.
- 2023-01-26, 9:44:02
- Forum: forwardcom forum
- Topic: Proposals for next version
- Replies: 16
- Views: 111912
Re: Proposals for next version
I would like to see a vector sum scan instruction, at least for floating-point numbers; possibly also integers, but the advantage is not so clear there.
- 2022-01-31, 1:02:01
- Forum: forwardcom forum
- Topic: Nonlocal control flow
- Replies: 10
- Views: 42140
Re: Nonlocal control flow
A branch hint only affects the prediction the first time a branch is met, which is irrelevant for overall performance. You still need a BTB entry if the hint says branch 'taken'. It is more efficient to organize code so that a forward branch is not taken most of the time. Interesting, thanks--does ...
- 2022-01-20, 8:18:07
- Forum: forwardcom forum
- Topic: Nonlocal control flow
- Replies: 10
- Views: 42140
Re: Nonlocal control flow
A non-local return will cause not only this return, but all pending returns to be mispredicted on CPUs that have a return prediction mechanism, which all high-end processors have today. I was going to mention this, but I forgot. Isn't this a case where forwardcom would do much better than tradition...
- 2022-01-19, 19:16:26
- Forum: forwardcom forum
- Topic: Nonlocal control flow
- Replies: 10
- Views: 42140
Re: Nonlocal control flow
I think that nonlocal returns may be implemented more efficiently as a sequence of normal returns. 1. Why? Why is it more efficient to return multiple times than just once? 2. How would that work without a branch after every call? Error handling can also be implemented without exception traps. My f...
- 2022-01-19, 8:36:20
- Forum: forwardcom forum
- Topic: Nonlocal control flow
- Replies: 10
- Views: 42140
Re: Nonlocal control flow
Nonlocal return is commonly used for ordinary control flow in e.g. common lisp; this restriction prohibits efficient cl implementations on forwardcom. Exceptions and similar mechanisms are not so slow in GCed languages as in e.g. c++, because you do not need to do so much irrelevant bookkeeping to c...
- 2022-01-18, 21:21:52
- Forum: forwardcom forum
- Topic: Nonlocal control flow
- Replies: 10
- Views: 42140
Nonlocal control flow
How should nonlocal control flow (such as exceptions) be implemented on forwardcom? The manual refers to read_call_stack and write_call_stack, but those are privileged; and anyway they are somewhat heavy-handed if all you want to do is unwind the call stack a bit (while retaining most of its entries).
- 2021-11-12, 10:00:07
- Forum: forwardcom forum
- Topic: Instruction boundaries
- Replies: 1
- Views: 16529
Instruction boundaries
X86 has no instruction boundaries; execution may be directed to any byte offset. This has a couple of cute imlications for codegolf (e.g. conditionally skip past a prefix), but no practical use. Meantime it opens up myriad possibilities for malicious actors to hide code in a manner which will not be...
- 2021-02-20, 9:35:17
- Forum: forwardcom forum
- Topic: Separate call stack and data stack
- Replies: 6
- Views: 15315
Re: Separate call stack and data stack
The mill cpu also does this, for similar reasons. I agree that a 1023 return addresses should be enough for just about anything, but you can blow through this pretty easily if you write an algorithm that scales at least linearly with problem size Languages that depend on deep levels of recursion usu...