Hacker News new | ask | show | jobs
by lepicz 237 days ago
some people simply like pain :D

(i worked with asn1c (not sure which fork) and had to hack in custom allocator and 64bit support. i shiver every time something needs attention in there)

2 comments

:)

Honestly any compiler project in pure C is pretty hardcore in my eyes, ASN.1 must amplify the sheer horror.

Well, C is the source of the horror, for me anyways.
I was using asn1c with a Rust project since there was no Rust asn1 compiler at the time. It became a bottleneck, and in profiling I found that the string copying helper used everywhere was doing bit-level copying even in our byte-aligned mode, which was extra weird cause that function had a param for byte alignment.

One memcpy made it like 30% faster overall.