small optimizations to reduce encoding time
fix bug: incr in parameterized architectures