Skip to content

Switch from BatEnum to Seq #1437

@sim642

Description

@sim642

In #975 some code was switched from eagerly-constructed lists to the standard Seq.t.
However, there's still many places where BatEnum/Enum is used, which offers similar lazy-sequence functionality.

We could try switching to the more standard Seq.t in those Enum instances, as long as there's no performance regression from doing so.

After #1443 and #1784, only a handful of instances remain:

  • BatFile.lines_of and BatIO.lines_of. We'll have to find a sensible way of doing that.
  • BatCache. We only use manual_cache which is just a thin wrapper around Hashtbl. We could easily just have a version in Goblint_std.
  • BatEnum.uniq. There is no Seq.uniq or equivalent. We probably could just avoid that anyway by deduplicating smarter using sets.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions