binyomen / binyomen/loxide

Store spans rather than line numbers in chunks

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
enhancement optimization
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently we store line numbers, which is a performance hit to compilation since we have to calculate the line number for each token.

Rather than having a vec of line numbers in the chunk we could have a vec of spans, and just calculate the line number at the least possible moment when an error occurs.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the chunk representation and the code that currently stores line numbers for tokens and reports errors. Trace how spans or line numbers are consumed during compilation, then update the representation so line numbers are calculated only when an error occurs and verify that error locations remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.