#Fast Logic Circuit

18 messages · Page 1 of 1 (latest)

full brook
#

What is the most efficient way to simulate logic circuits because using dynamic allocation and such just causes alot of overhead and i need to generate, evaluate, modify and destroy them extremly quickly for my project

foggy geodeBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

fair spire
#

What is the most efficient way to simulate logic circuits
Handwritten assembly, optimized for the specific hardware/software combination you're programming on, but you probably don't want to do that.

and i need to generate, evaluate, modify and destroy them extremly quickly for my project
Can you go into a little bit more detail? Cause right now I don't understand why it couldn't just be a function, like e.g.:

static inline nand(bit a, bit b) {
    return !(a & b);
}
```(of course there is no `bit` datatype, but we could just use `unsigned char` instead, then do some bit manipulations if required)
bronze oasis
#

If you need fast dynamic alloc maybe use memory pool?

spark sun
main torrent
spark sun
main torrent
spark sun
main torrent
#

guess i don't understand what "language level" means in this context then

spark sun
#

not the standard library

main torrent
# spark sun part of the language

oh, so you mean it's in by default rather than in a header? in that case, C23 has bool as a keyword, and that superseded _Bool as a keyword, which was introduced in C99 and deprecated in C23

honest depot
#

if alloc sucks, pre alloc

spark sun
#

Problem solved

honest depot
#

virtual memory being a pain.. just run your own bare metal OS