Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to think the same way, but I've since changed my mind and consider it now premature optimization: It's totally okay to do it in a just-for-fun project, but otherwise the usual rules for optimizations apply: 1) Only do it once you know if and where it is actually necessary and 2) measure the impact of your changes.

Especially for beginners I would recommend that you reset all your registers, because errors due to uninitialized signals are a pain to debug, and they might not be visible in simulation. For example, if r is uninitialized and has the value 'U' (or 'X'), then

    if r = '0' then ... else ... end if;
will execute the else-branch in simulation, but might take the then-branch in a hardware.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: