Optimizating my code simulating a database

后端 未结 5 1389
难免孤独
难免孤独 2021-01-20 13:41

I have been working on a program, simulating a small database where I could make queries, and after writing the code, I have executed it, but the performance is quite bad. I

5条回答
  •  悲&欢浪女
    2021-01-20 14:37

    Whenever you have performance problems, the first thing you want to do is to profile your code. Here is a list of free tools that can do that on windows, and here for linux. Profile your code, identify the bottlenecks, and then come back and ask a specific question.

    Also, like I said in my comment, can't you just use SQLite? It supports in-memory databases, making it suitable for testing, and it is lightweight and fast.

提交回复
热议问题