I would usually recommend finding a dedicated CSV parser (like this or this ). However, I noticed this line in your question:
I need to determine for a given input whether any line in csv will start with this input.
This tells me that computer time parses CSV data before it is determined, this time is wasted. You just need code that just matches the text for the text, and you can do this by comparing strings as easily as anything else.
In addition, you indicate that the data is sorted. This should allow you to speed things up considerably ... but you need to know that for this you will need to write your own code to make search calls in low-level file streams. This will be by far the most effective result, but it will also certainly require the most initial work and maintenance.
I recommend an engineering-based approach where you set a performance goal, build something relatively simple, and measure results for that purpose. In particular, start with the 2nd link above. The CSV reader will only load one entry into memory at a time, so it should work pretty well and it's easy to get started. Create something that this reader uses and measure the results. If they achieve your goal, stop there.
If they do not fit your purpose, adapt the code from the link so that when reading each line, the lines are compared first (before trying to parse the csv data), and do only the csv analysis for the lines that correspond. This should work better, but only do the job if the first option does not meet your goals. When it is ready, measure the productivity again.
Finally, if you still haven’t reached your performance goal, we’ve entered the territory of writing low-level code to perform a binary search in your file stream using search queries. This is most likely the best thing you can do in terms of performance, but it will be very dirty and error-prone code to write, and therefore you only want to go here if you are absolutely not up to your goals from the earlier steps.
Remember that performance is a function, and like any other function, you need to evaluate how you create this function compared to the actual design goals. "As soon as possible" is not a reasonable design goal. Something like “respond to user search within .25 seconds” is the real design goal, and if the simpler but slower code still matches that goal, you need to stop there.