comment out a couple of dbg lines in inner loops for performance

This commit is contained in:
Stefan Frederik 2021-12-07 19:15:37 +01:00
parent 989388e14b
commit 1e2983483f
2 changed files with 8 additions and 2 deletions

View File

@ -47,7 +47,7 @@ void init_inst_iterator(struct iterator_ctx *ctx, double x1, double y1, double x
struct instentry *inst_iterator_next(struct iterator_ctx *ctx)
{
struct instentry *ptr;
dbg(3, "inst_iterator_next(): instances=%d\n", xctx->instances);
/* dbg(3, "inst_iterator_next(): instances=%d\n", xctx->instances); */
while(1) {
while(ctx->instanceptr) {
ptr = ctx->instanceptr;
@ -100,7 +100,7 @@ void init_wire_iterator(struct iterator_ctx *ctx, double x1, double y1, double x
struct wireentry *wire_iterator_next(struct iterator_ctx *ctx)
{
struct wireentry *ptr;
dbg(3, "wire_iterator_next(): wires=%d\n", xctx->wires);
/* dbg(3, "wire_iterator_next(): wires=%d\n", xctx->wires); */
while(1) {
while(ctx->wireptr) {
ptr = ctx->wireptr;

View File

@ -2807,6 +2807,12 @@ const char *translate(int inst, const char* s)
if(!sp_prefix && !strcmp(token, "@spiceprefix")) {
value = NULL;
xctx->get_tok_size = 0;
/* not that worth doing this optimization */
/*
} else if(!strcmp(token, "@name")) {
value = xctx->inst[inst].instname;
xctx->get_tok_size=4;
*/
} else {
value = get_tok_value(xctx->inst[inst].prop_ptr, token+1, 0);
if(!xctx->get_tok_size) value=get_tok_value((xctx->inst[inst].ptr+ xctx->sym)->templ, token+1, 0);