Opened 19 years ago

Closed 18 years ago

Last modified 6 years ago

#8535 closed patch

residual: optimize Font::getCharIndex

Reported by: SF/mannythegnome Owned by: aquadran
Priority: normal Component: ResidualVM
Version: Keywords:
Cc: Game:

Description

The attached patch ensures that if the font's character index matches the character index, it is returned directly, instead of iterating the font's character table.

According to gprof this was a bottleneck:

% cumulative self self total time seconds seconds calls s/call s/call name 34.30 10.75 10.75 1867826 0.00 0.00 Font::getCharIndex(unsigned char)

Ticket imported from: #1495110. Ticket imported from: patches/640.

Attachments (1)

residual-font.diff (448 bytes ) - added by SF/mannythegnome 19 years ago.
proposed patch

Download all attachments as: .zip

Change History (4)

by SF/mannythegnome, 19 years ago

Attachment: residual-font.diff added

proposed patch

comment:1 by aquadran, 18 years ago

Owner: set to aquadran
Status: newclosed

comment:2 by aquadran, 18 years ago

patch applied, thanks

comment:3 by digitall, 6 years ago

Component: ResidualVM
Note: See TracTickets for help on using tickets.