Changes between Initial Version and Version 1 of Ticket #8281, comment 19


Ignore:
Timestamp:
May 17, 2017 11:44:52 PM (18 months ago)
Author:
bgamari
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8281, comment 19

    initial v1  
    33However, I am a bit worried that the inability to pass `ByteArray#`s to foreign calls may put us in a bit of a pickle performance-wise. For instance, currently `text` uses a C helper, `hs_text_decode_utf8`, to implement equality on `Text` (see `Data.Text.Array.equal`). Not only would it be harder to write the equivalent C-- implementation, but you would also be limited to the optimisation capabilities of the GHC backend, which might hurt for a tight loop such as this.
    44
    5 What is the rationale for allowing GHC to implement `unsafe` calls as a `safe` call? It seems like this puts library authors is a tough spot.
     5What is the rationale for allowing GHC to implement `unsafe` calls as `safe` calls? It seems like this puts library authors is a tough spot.